public Solution(string path) { string baseDir = Path.GetDirectoryName(path); FileList solution = new FileList("Project(", ".csproj", ','); string[] projectFiles = solution.GetList(path); FileList project = new FileList("Compile Include=", ".cs", '"'); _projects = new List <CSProject>(); for (int i = 0; i < projectFiles.Length; i++) { CSProject csProject = new CSProject(); csProject.dir = Path.GetDirectoryName(Path.Combine(baseDir, projectFiles[i])); csProject.name = projectFiles[i]; csProject.csList = project.GetList(Path.Combine(baseDir, projectFiles[i])); _projects.Add(csProject); } }
public Solution(string path) { string baseDir = Path.GetDirectoryName(path); FileList solution = new FileList("Project(", ".csproj", ','); string[] projectFiles = solution.GetList(path); FileList project = new FileList("Compile Include=", ".cs", '"'); _projects = new List<CSProject>(); for(int i=0; i < projectFiles.Length; i++) { CSProject csProject = new CSProject(); csProject.dir = Path.GetDirectoryName(Path.Combine(baseDir, projectFiles[i])); csProject.name = projectFiles[i]; csProject.csList = project.GetList(Path.Combine(baseDir, projectFiles[i])); _projects.Add(csProject); } }