public UpdatePackageFeed(
     IServiceBroker serviceBroker,
     IEnumerable <PackageCollectionItem> installedPackages,
     IPackageMetadataProvider metadataProvider,
     IProjectContextInfo[] projects,
     PackageSearchMetadataCache optionalCachedUpdates,
     Common.ILogger logger)
 {
     _installedPackages = installedPackages ?? throw new ArgumentNullException(nameof(installedPackages));
     _metadataProvider  = metadataProvider ?? throw new ArgumentNullException(nameof(metadataProvider));
     _projects          = projects ?? throw new ArgumentNullException(nameof(projects));
     _cachedUpdates     = optionalCachedUpdates;
     _logger            = logger ?? throw new ArgumentNullException(nameof(logger));
     _serviceBroker     = serviceBroker ?? throw new ArgumentNullException(nameof(serviceBroker));
 }
Esempio n. 2
0
        public UpdatePackageFeed(
            IEnumerable <PackageCollectionItem> installedPackages,
            IPackageMetadataProvider metadataProvider,
            NuGetProject[] projects,
            PackageSearchMetadataCache optionalCachedUpdates,
            Common.ILogger logger)
        {
            if (installedPackages == null)
            {
                throw new ArgumentNullException(nameof(installedPackages));
            }

            _installedPackages = installedPackages;

            if (metadataProvider == null)
            {
                throw new ArgumentNullException(nameof(metadataProvider));
            }

            _metadataProvider = metadataProvider;

            if (projects == null)
            {
                throw new ArgumentNullException(nameof(projects));
            }

            _projects = projects;

            _cachedUpdates = optionalCachedUpdates;

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            _logger = logger;
        }