private List<string> BuildListOfProjectsNotInASolutionFolder(List<string> csprojLines, List<SolutionFolderObject> solutionFolders) { List<string> unNestedProjects = new List<string>(); List<string> allNestedProjects = GetAllNestedProjectGuids(solutionFolders); foreach (string line in csprojLines) { CSProjLine csprojLine = new CSProjLine(line); if(!IsNested(allNestedProjects, csprojLine.ProjectGuid)) { unNestedProjects.Add(csprojLine.ProjectGuid); } } return unNestedProjects; }
public FileView(List<string> lines, string rootPath) { List<string> projectLines = Common.ApplyFilter(lines, Constants.PROJECT, null); List<string> csprojLines = Common.ApplyFilter(projectLines, null, Constants.CSPROJ); Projects = new List<ProjectObject>(); foreach (string line in csprojLines) { CSProjLine csprojLine = new CSProjLine(line); ProjectObject project = new ProjectObject { Name = csprojLine.Name, RelativePath = csprojLine.RelativePath, ProjectGuid = csprojLine.ProjectGuid}; CSProjFileParser.Parse(rootPath + project.RelativePath, project); Projects.Add(project); } }