protected override void UpdateRepositoryBeforeReadPackagesTaskStarts() { try { IPackageRepository repository = RegisteredPackageRepositories.ActiveRepository; IQueryable<IPackage> installedPackages = GetInstalledPackages(repository); updatedPackages = new UpdatedPackages(installedPackages, repository); } catch (Exception ex) { errorMessage = ex.Message; } }
protected override void UpdateRepositoryBeforeReadPackagesTaskStarts() { try { IPackageRepository repository = RegisteredPackageRepositories.ActiveRepository; IQueryable <IPackage> installedPackages = GetInstalledPackages(repository); updatedPackages = new UpdatedPackages(installedPackages, repository); } catch (Exception ex) { errorMessage = ex.Message; } }
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); }
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)); }
void CreateUpdatedPackages (IPackageRepository repository) { updatedPackages = new UpdatedPackages (project, repository); }