コード例 #1
0
        public static bool IsWindowsStoreApp(EnvDTE.Project envDTEProject)
        {
            Debug.Assert(ThreadHelper.CheckAccess());

            string[] types = VsHierarchyUtility.GetProjectTypeGuids(envDTEProject);
            return(types.Contains(VsProjectTypes.WindowsStoreProjectTypeGuid, StringComparer.OrdinalIgnoreCase));
        }
コード例 #2
0
 private static bool IsWebProject(EnvDTE.Project envDTEProject)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     string[] types = VsHierarchyUtility.GetProjectTypeGuids(envDTEProject);
     return(types.Contains(VsProjectTypes.WebSiteProjectTypeGuid, StringComparer.OrdinalIgnoreCase) ||
            types.Contains(VsProjectTypes.WebApplicationProjectTypeGuid, StringComparer.OrdinalIgnoreCase));
 }
コード例 #3
0
        private static bool IsWebProject(EnvDTE.Project envDTEProject)
        {
            Debug.Assert(ThreadHelper.CheckAccess());

            string[] types = VsHierarchyUtility.GetProjectTypeGuids(envDTEProject);
            return(types.Contains(VsProjectTypes.WebSiteProjectTypeGuid, StringComparer.OrdinalIgnoreCase) ||
                   types.Contains(VsProjectTypes.WebApplicationProjectTypeGuid, StringComparer.OrdinalIgnoreCase));
        }
コード例 #4
0
        public static async Task <string[]> GetProjectTypeGuidsAsync(this EnvDTE.Project project)
        {
            Verify.ArgumentIsNotNull(project, nameof(project));

            await NuGetUIThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            // Get the vs hierarchy as an IVsAggregatableProject to get the project type guids
            IVsHierarchy hierarchy = await ToVsHierarchyAsync(project);

            string[] projectTypeGuids = VsHierarchyUtility.GetProjectTypeGuids(hierarchy, project.Kind);

            return(projectTypeGuids);
        }
コード例 #5
0
        public static string[] GetProjectTypeGuids(this EnvDTE.Project project)
        {
            Verify.ArgumentIsNotNull(project, nameof(project));

            ThreadHelper.ThrowIfNotOnUIThread();

            // Get the vs hierarchy as an IVsAggregatableProject to get the project type guids
            IVsHierarchy hierarchy = ToVsHierarchy(project);

            string[] projectTypeGuids = VsHierarchyUtility.GetProjectTypeGuids(hierarchy, project.Kind);

            return(projectTypeGuids);
        }
コード例 #6
0
 public static bool IsWindowsStoreApp(EnvDTE.Project envDTEProject)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     string[] types = VsHierarchyUtility.GetProjectTypeGuids(envDTEProject);
     return(types.Contains(VsProjectTypes.WindowsStoreProjectTypeGuid, StringComparer.OrdinalIgnoreCase));
 }