Ejemplo n.º 1
0
        public static PackagesInStandardProject Create(string projectFile)
        {
            var o = new PackagesInStandardProject(projectFile);

            o.Parse();
            return(o);
        }
Ejemplo n.º 2
0
        public static IEnumerable <PackageCollection> GetPackageCollectionsUnder(string root)
        {
            GenLog.Info($"Looking for NuGet packages used under {root}");

            var pkgConfigFiles = Directory.GetFiles(root, "packages.config", SearchOption.AllDirectories)
                                 .Where(ShouldProcessDirectoryContaining);

            foreach (var file in pkgConfigFiles)
            {
                yield return(PackagesInConfigFile.Create(file));
            }

            var projects = Directory.GetFiles(root, "*.csproj", SearchOption.AllDirectories)
                           .Where(ShouldProcessProject);

            foreach (var file in projects)
            {
                yield return(PackagesInStandardProject.Create(file));
            }
        }