Пример #1
0
        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))));
        }
Пример #2
0
        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);
        }