当前位置: 首页>>代码示例>>C#>>正文


C# ISolution.GetAllProjects方法代码示例

本文整理汇总了C#中ISolution.GetAllProjects方法的典型用法代码示例。如果您正苦于以下问题:C# ISolution.GetAllProjects方法的具体用法?C# ISolution.GetAllProjects怎么用?C# ISolution.GetAllProjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISolution的用法示例。


在下文中一共展示了ISolution.GetAllProjects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NitraSolutionComponent

        public NitraSolutionComponent(Lifetime lifetime, ISolution solution, ChangeManager changeManager, DocumentManager documentManager,
            IShellLocks locks, IPsiConfiguration psiConfiguration, IPersistentIndexManager persistentIndexManager)
        {
            _persistentIndexManager = persistentIndexManager;
              _psiConfiguration = psiConfiguration;
              _locks = locks;
              _solution = solution;
              _documentManager = documentManager;
              //changeManager.Changed2.Advise(lifetime, OnChangeManagerChanged);

              changeManager.RegisterChangeProvider(lifetime, this);
              changeManager.AddDependency(lifetime, this, documentManager.ChangeProvider);
              changeManager.AddDependency(lifetime, this, solution);

              foreach (var project in solution.GetAllProjects())
              {
            Debug.WriteLine(project.Name);
            //var projectItem = project as JetBrains.Proj
            foreach (var file in project.GetAllProjectFiles())
            {
              var ext = System.IO.Path.GetExtension(file.Name);
              if (string.Equals(ext, ".dll", StringComparison.InvariantCultureIgnoreCase))
            continue;

              if (file.LanguageType.Name == "MSBuild")
            continue;

              if (string.Equals(ext, ".dsl", StringComparison.InvariantCultureIgnoreCase))
              {
            var stream = file.CreateReadStream();
            string content = "";
            using (var streamReader = new StreamReader(stream))
              content = streamReader.ReadToEnd();
            Debug.WriteLine(content);
              }

              Debug.WriteLine(file.Name);
            }

              }
        }
开发者ID:hwwang,项目名称:Nitra,代码行数:41,代码来源:NitraSolutionComponent.cs

示例2: CollectAllFilesToAnalyze

        private List<FileSystemPath> CollectAllFilesToAnalyze(ISolution solution)
        {
            List<FileSystemPath> files_to_analyze = new List<FileSystemPath>();
            SimianProjectVisitor visitor = new SimianProjectVisitor(files_to_analyze);

            visitor.AddExcludeSpecs(SimianOptions.Instance.SpecsToExclude);
            visitor.AddIncludeSpecs(SimianOptions.Instance.SpecsToInclude);

            foreach (IProject project in solution.GetAllProjects())
            {
                project.Accept(visitor);
            }
            return files_to_analyze;
        }
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:14,代码来源:ExploreSimianAction.cs


注:本文中的ISolution.GetAllProjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。