public static Collection <SolutionInfo> GetSolutions(string path) { Collection <SolutionInfo> solutions = new Collection <SolutionInfo>(); string[] files = Directory.GetFiles(path); if (files != null) { for (int ix = 0; ix < files.Length; ix++) { if (!Path.GetFileName(files[ix]).EndsWith("_sln.xslt")) { continue; } SolutionInfo solution = new SolutionInfo(); solution.FolderName = path; solution.SolutionName = Path.GetFileNameWithoutExtension(files[ix]).Replace("_sln", ""); solutions.Add(solution); } } return(solutions); }
public static void DeleteSolution(SolutionInfo solution) { File.Delete(solution.FileName); }
public static Collection<SolutionInfo> GetSolutions(string path) { Collection<SolutionInfo> solutions = new Collection<SolutionInfo>(); string[] files = Directory.GetFiles(path); if (files != null) { for (int ix = 0; ix < files.Length; ix++) { if (!Path.GetFileName(files[ix]).EndsWith("_sln.xslt")) continue; SolutionInfo solution = new SolutionInfo(); solution.FolderName = path; solution.SolutionName = Path.GetFileNameWithoutExtension(files[ix]).Replace("_sln", ""); solutions.Add(solution); } } return solutions; }