本文整理汇总了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);
}
}
}
示例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;
}