public ProjectInfo(SolutionInfo solutionInfo, FilePath path, SolutionProject solutionProject, ProjectParserResult parserResult) { this.SolutionInfo = solutionInfo; this.Path = path; this.SolutionProject = solutionProject; this.ParserResult = parserResult; }
public static bool IsMsTestProject(this ProjectParserResult projectParserResult, string projectPath) { XDocument document = XDocument.Load(projectPath); var projectType = (from project in document.Elements(Project) from propertyGroup in project.Elements(PropertyGroup) select propertyGroup.Elements(TestProjectType).Select(testProjectType => testProjectType.Value) .FirstOrDefault()) .FirstOrDefault(); return(projectType == "UnitTest"); }
public IEnumerable<ProjectInfo> ExploreDirectory(SolutionInfo solutionInfo) { var parsableItems = directoryExplorer.Explore(solutionInfo.SolutionPath.FullPath); foreach (var parsableItem in parsableItems) { ProjectParserResult parserResult = null; if (parsableItem.Type == ParsableItem.ItemType.MsBuildProject) { parserResult = projectParser.Parse(parsableItem.Path); } yield return new ProjectInfo(solutionInfo, parsableItem.Path, null, parserResult); } }
public IEnumerable<ProjectInfo> ParseSolutionFile(SolutionInfo solutionInfo) { var solutionParserResult = solutionParser.Parse((FilePath)solutionInfo.SolutionPath); foreach (var project in solutionParserResult.Projects) { ProjectParserResult parserResult = null; if (File.Exists(project.Path.FullPath)) { parserResult = projectParser.Parse(project.Path); } yield return new ProjectInfo(solutionInfo, project.Path, project, parserResult); } }
public static bool IsTestProjectType(this ProjectParserResult projectParserResult, string projectPath) { return(GetProjectTypeGuids(projectPath).Any(MsBuildGuids.IsTest)); }
public static bool IsExecutableApplication(this ProjectParserResult projectParserResult) { return(StringComparer.OrdinalIgnoreCase.Equals(projectParserResult.OutputType, "EXE")); }
public static bool IsWebApplication(this ProjectParserResult projectParserResult, string projectPath) { return(GetProjectTypeGuids(projectPath).Any(MsBuildGuids.IsWebApplication)); }
private bool ContainsMigrations(ProjectParserResult parserResult) { return(parserResult.Files.Any(f => f.Compile && f.RelativePath.ToLower().Contains("migrations"))); }