Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Utility.cs

Issue 11145025: Only store major version of AddIn in VS project file (Closed) Base URL: http://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 namespace NativeClientVSAddIn 5 namespace NativeClientVSAddIn
6 { 6 {
7 using System; 7 using System;
8 using System.Collections.Generic; 8 using System.Collections.Generic;
9 9
10 using EnvDTE; 10 using EnvDTE;
11 using EnvDTE80; 11 using EnvDTE80;
12 using Microsoft.VisualStudio.VCProjectEngine; 12 using Microsoft.VisualStudio.VCProjectEngine;
13 13
14 /// <summary> 14 /// <summary>
15 /// Contains helper functions for this add-in. 15 /// Contains helper functions for this add-in.
16 /// </summary> 16 /// </summary>
17 public static class Utility 17 public static class Utility
18 { 18 {
19 /// <summary> 19 /// <summary>
20 /// Tells us if the given project is a Visual C/C++ project. 20 /// Tells us if the given project is a Visual C/C++ project.
21 /// </summary> 21 /// </summary>
22 /// <param name="proj">Project to check.</param> 22 /// <param name="proj">Project to check.</param>
23 /// <returns>True if project is a Visual C/C++ project.</returns> 23 /// <returns>True if project is a Visual C/C++ project.</returns>
24 public static bool IsVisualCProject(Project proj) 24 public static bool IsVisualCProject(Project proj)
25 { 25 {
26 if (proj.Properties == null)
27 {
28 return false;
29 }
26 foreach (Property prop in proj.Properties) 30 foreach (Property prop in proj.Properties)
27 { 31 {
28 if (prop.Name == "Kind") 32 if (prop.Name == "Kind")
29 { 33 {
30 string projectType = prop.Value as string; 34 string projectType = prop.Value as string;
31 return projectType == "VCProject"; 35 return projectType == "VCProject";
32 } 36 }
33 } 37 }
34 38
35 return false; 39 return false;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 proc.ParentID, 215 proc.ParentID,
212 anscestor, 216 anscestor,
213 proc.CreationDate); 217 proc.CreationDate);
214 } 218 }
215 } 219 }
216 220
217 return false; 221 return false;
218 } 222 }
219 } 223 }
220 } 224 }
OLDNEW
« no previous file with comments | « visual_studio/NativeClientVSAddIn/NativeClientVSAddIn/Connect.cs ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698