コード例 #1
0
        private bool IsFullyBoundProject(ISolutionRuleSetsInformationProvider ruleSetInfoProvider, IRuleSetSerializer ruleSetSerializer,
                                         BindingConfiguration binding, Project project)
        {
            var languages = ProjectToLanguageMapper.GetAllBindingLanguagesForProject(project);

            return(languages.All(l => IsFullyBoundProject(ruleSetInfoProvider, ruleSetSerializer, binding, project, l)));
        }
コード例 #2
0
        public static Language ForProject(EnvDTE.Project dteProject)
        {
            if (dteProject == null)
            {
                throw new ArgumentNullException(nameof(dteProject));
            }

            // TODO: remove this method - change the callers to call the following method directly
            return(ProjectToLanguageMapper.GetLanguageForProject(dteProject));
        }
コード例 #3
0
        public IEnumerable <Project> GetSolutionProjects()
        {
            IVsSolution solution = this.serviceProvider.GetService <SVsSolution, IVsSolution>();

            Debug.Assert(solution != null, "Cannot find SVsSolution");

            foreach (var hierarchy in EnumerateProjects(solution))
            {
                Project Project = GetProject(hierarchy);
                if (Project != null && !ProjectToLanguageMapper.GetLanguageForProject(Project).Equals(Language.Unknown))
                {
                    yield return(Project);
                }
            }
        }
コード例 #4
0
        private static bool IsNotSupportedProject(DteProject project)
        {
            var language = ProjectToLanguageMapper.GetLanguageForProject(project);

            return(language == null || !language.IsSupported);
        }