README.md

This commit is contained in:
Matthew Parker
2023-08-31 21:15:49 +10:00
parent 526ff1b43d
commit 1764142382
5 changed files with 108 additions and 14 deletions

View File

@@ -18,6 +18,14 @@ public static class SolutionParityChecker
}
public static string[] RetrieveAllCSharpProjectNamesFromFolder(string solutionFolderPath)
{
var csprojList = RetrieveAllCSharpProjectFullPathsFromFolder(solutionFolderPath);
csprojList = csprojList.Select(x => x.Replace(solutionFolderPath, "")).ToArray();
return csprojList;
}
public static string[] RetrieveAllCSharpProjectFullPathsFromFolder(string solutionFolderPath)
{
// if solutionFolderPath does not end with a slash, add one
if (solutionFolderPath[^1] != Path.DirectorySeparatorChar)
@@ -29,7 +37,6 @@ public static class SolutionParityChecker
"*.csproj",
SearchOption.AllDirectories
);
csprojList = csprojList.Select(x => x.Replace(solutionFolderPath, "")).ToArray();
return csprojList;
}
@@ -60,6 +67,7 @@ public static class SolutionParityChecker
return projectsMissingFromSolution;
}
public static List<ProjectRootElement> GetCSharpProjectObjectsFromSolutionFile(
SolutionFile solutionFile
)