public PackagesConfig TryReadPackagesConfig(VerifiedFolder folder) { var file = folder.GetRelativeFile("packages.config"); if (file is VerifiedFile verifiedFile) { return(new PackagesConfig(verifiedFile, this)); } else { return(null); } }
public static void RevertAllCsProjAndPackagesConfigFiles(VerifiedFolder directory) { var csprojFile = directory.GetFiles() .FirstOrDefault(f => f.FullName.EndsWith("csproj")); if (csprojFile != null) { RevertFileState(csprojFile); var packagesConfigFile = directory.GetRelativeFile("packages.config"); RevertFileState(packagesConfigFile); } foreach (var folder in directory.GetDirectories()) { RevertAllCsProjAndPackagesConfigFiles(folder); } }