Ejemplo n.º 1
0
 public AuxiliaryDataCache(
     IDownloadDataClient downloadDataClient,
     IVerifiedPackagesDataClient verifiedPackagesDataClient,
     IAzureSearchTelemetryService telemetryService,
     ILogger <AuxiliaryDataCache> logger)
 {
     _downloadDataClient         = downloadDataClient ?? throw new ArgumentNullException(nameof(downloadDataClient));
     _verifiedPackagesDataClient = verifiedPackagesDataClient ?? throw new ArgumentNullException(nameof(verifiedPackagesDataClient));
     _telemetryService           = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     _stringCache = new StringCache();
 }
Ejemplo n.º 2
0
 public UpdateVerifiedPackagesCommand(
     IDatabaseAuxiliaryDataFetcher databaseFetcher,
     IVerifiedPackagesDataClient verifiedPackagesDataClient,
     IAzureSearchTelemetryService telemetryService,
     ILogger <Auxiliary2AzureSearchCommand> logger)
 {
     _databaseFetcher            = databaseFetcher ?? throw new ArgumentNullException(nameof(databaseFetcher));
     _verifiedPackagesDataClient = verifiedPackagesDataClient ?? throw new ArgumentNullException(nameof(verifiedPackagesDataClient));
     _telemetryService           = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger      = logger ?? throw new ArgumentNullException(nameof(logger));
     _stringCache = new StringCache();
 }
Ejemplo n.º 3
0
        public Db2AzureSearchCommand(
            INewPackageRegistrationProducer producer,
            IPackageEntityIndexActionBuilder indexActionBuilder,
            IBlobContainerBuilder blobContainerBuilder,
            IIndexBuilder indexBuilder,
            Func <IBatchPusher> batchPusherFactory,
            ICatalogClient catalogClient,
            IStorageFactory storageFactory,
            IOwnerDataClient ownerDataClient,
            IDownloadDataClient downloadDataClient,
            IVerifiedPackagesDataClient verifiedPackagesDataClient,
            IPopularityTransferDataClient popularityTransferDataClient,
            IOptionsSnapshot <Db2AzureSearchConfiguration> options,
            IOptionsSnapshot <Db2AzureSearchDevelopmentConfiguration> developmentOptions,
            ILogger <Db2AzureSearchCommand> logger)
        {
            _producer                     = producer ?? throw new ArgumentNullException(nameof(producer));
            _indexActionBuilder           = indexActionBuilder ?? throw new ArgumentNullException(nameof(indexActionBuilder));
            _blobContainerBuilder         = blobContainerBuilder ?? throw new ArgumentNullException(nameof(blobContainerBuilder));
            _indexBuilder                 = indexBuilder ?? throw new ArgumentNullException(nameof(indexBuilder));
            _batchPusherFactory           = batchPusherFactory ?? throw new ArgumentNullException(nameof(batchPusherFactory));
            _catalogClient                = catalogClient ?? throw new ArgumentNullException(nameof(catalogClient));
            _storageFactory               = storageFactory ?? throw new ArgumentNullException(nameof(storageFactory));
            _ownerDataClient              = ownerDataClient ?? throw new ArgumentNullException(nameof(ownerDataClient));
            _downloadDataClient           = downloadDataClient ?? throw new ArgumentNullException(nameof(downloadDataClient));
            _verifiedPackagesDataClient   = verifiedPackagesDataClient ?? throw new ArgumentNullException(nameof(verifiedPackagesDataClient));
            _popularityTransferDataClient = popularityTransferDataClient ?? throw new ArgumentNullException(nameof(popularityTransferDataClient));
            _options            = options ?? throw new ArgumentNullException(nameof(options));
            _developmentOptions = developmentOptions ?? throw new ArgumentNullException(nameof(developmentOptions));
            _logger             = logger ?? throw new ArgumentNullException(nameof(logger));

            if (_options.Value.MaxConcurrentBatches <= 0)
            {
                throw new ArgumentOutOfRangeException(
                          nameof(options),
                          $"The {nameof(AzureSearchJobConfiguration.MaxConcurrentBatches)} must be greater than zero.");
            }
        }