private static IEnumerable <PackageInProject> FindPackages(IFolder workingFolder, IPackageReferenceFinder packageReferenceFinder) { var files = packageReferenceFinder .GetFilePatterns() .SelectMany(workingFolder.Find) .Where(f => !DirectoryExclusions.PathIsExcluded(f.FullName)); return(files.SelectMany(f => packageReferenceFinder.ReadFile( workingFolder.FullPath, GetRelativeFileName( workingFolder.FullPath, f.FullName)))); }
private IEnumerable <PackageInProject> PackageFiles(IFolder workingFolder) { var packagesFiles = workingFolder.Find("packages.config") .Where(f => !DirectoryExclusions.PathIsExcluded(f.FullName)); var results = new List <PackageInProject>(); foreach (var packagesFile in packagesFiles) { var packages = _packagesFileReader.ReadFile(workingFolder.FullPath, GetRelativeFileName(workingFolder.FullPath, packagesFile.FullName)); results.AddRange(packages); } return(results); }