Esempio n. 1
0
        public UpdatedPackagesInProject CheckForUpdates(IPackageManagementProject project)
        {
            LogCheckingForUpdates(project.Name);

            project.Logger = new PackageManagementLogger(packageManagementEvents);
            var             updatedPackages = new UpdatedPackages(project, project.SourceRepository);
            List <IPackage> packages        = updatedPackages.GetUpdatedPackages().ToList();

            LogPackagesFound(packages.Count);

            return(new UpdatedPackagesInProject(project.Project, packages));
        }
        void CheckForUpdates(IPackageManagementProject project)
        {
            LogCheckingForUpdates(project.Name);

            project.Logger = new PackageManagementLogger(packageManagementEvents);
            var             updatedPackages = new UpdatedPackages(project, project.SourceRepository);
            List <IPackage> packages        = updatedPackages.GetUpdatedPackages().ToList();

            if (packages.Any())
            {
                GuiDispatch(() => {
                    projectsWithUpdatedPackages.Add(new UpdatedPackagesInProject(project.Project, packages));
                });
            }

            LogPackagesFound(packages.Count);
        }
Esempio n. 3
0
        IEnumerable <IPackage> GetUpdatedPackages(
            IPackageManagementProject project,
            IEnumerable <PackageReference> packageReferences,
            bool includePrerelease,
            Func <PackageReference, bool> filter)
        {
            var filteredPackageReferences = packageReferences.Where(filter).ToList();

            if (!filteredPackageReferences.Any())
            {
                return(Enumerable.Empty <IPackage> ());
            }

            var updatedPackages = new UpdatedPackages(
                filteredPackageReferences,
                project.SourceRepository,
                project.ConstraintProvider);

            return(updatedPackages.GetUpdatedPackages(includePrerelease));
        }
Esempio n. 4
0
 IQueryable <IPackage> GetUpdatedPackages()
 {
     return(updatedPackages.GetUpdatedPackages(IncludePrerelease).AsQueryable());
 }