public UpdateOwnersCommand( IDatabaseAuxiliaryDataFetcher databaseFetcher, IOwnerDataClient ownerDataClient, IDataSetComparer ownerSetComparer, ISearchDocumentBuilder searchDocumentBuilder, ISearchIndexActionBuilder indexActionBuilder, Func <IBatchPusher> batchPusherFactory, IOptionsSnapshot <AzureSearchJobConfiguration> options, IAzureSearchTelemetryService telemetryService, ILogger <UpdateOwnersCommand> logger) { _databaseFetcher = databaseFetcher ?? throw new ArgumentNullException(nameof(databaseFetcher)); _ownerDataClient = ownerDataClient ?? throw new ArgumentNullException(nameof(ownerDataClient)); _ownerSetComparer = ownerSetComparer ?? throw new ArgumentNullException(nameof(ownerSetComparer)); _searchDocumentBuilder = searchDocumentBuilder ?? throw new ArgumentNullException(nameof(searchDocumentBuilder)); _searchIndexActionBuilder = indexActionBuilder ?? throw new ArgumentNullException(nameof(indexActionBuilder)); _batchPusherFactory = batchPusherFactory ?? throw new ArgumentNullException(nameof(batchPusherFactory)); _options = options ?? throw new ArgumentNullException(nameof(options)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); _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."); } }
public PackageEntityIndexActionBuilder( ISearchDocumentBuilder search, IHijackDocumentBuilder hijack, ILogger <PackageEntityIndexActionBuilder> logger) { _search = search ?? throw new ArgumentNullException(nameof(search)); _hijack = hijack ?? throw new ArgumentNullException(nameof(hijack)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public CatalogIndexActionBuilder( IVersionListDataClient versionListDataClient, ICatalogLeafFetcher leafFetcher, IDatabaseAuxiliaryDataFetcher ownerFetcher, ISearchDocumentBuilder search, IHijackDocumentBuilder hijack, ILogger <CatalogIndexActionBuilder> logger) { _versionListDataClient = versionListDataClient ?? throw new ArgumentNullException(nameof(versionListDataClient)); _leafFetcher = leafFetcher ?? throw new ArgumentNullException(nameof(leafFetcher)); _ownerFetcher = ownerFetcher ?? throw new ArgumentNullException(nameof(ownerFetcher)); _search = search ?? throw new ArgumentNullException(nameof(search)); _hijack = hijack ?? throw new ArgumentNullException(nameof(hijack)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public UpdateDownloadsCommand( IAuxiliaryFileClient auxiliaryFileClient, IDatabaseAuxiliaryDataFetcher databaseFetcher, IDownloadDataClient downloadDataClient, IDownloadSetComparer downloadSetComparer, IDownloadTransferrer downloadTransferrer, IPopularityTransferDataClient popularityTransferDataClient, ISearchDocumentBuilder searchDocumentBuilder, ISearchIndexActionBuilder indexActionBuilder, Func <IBatchPusher> batchPusherFactory, ISystemTime systemTime, IFeatureFlagService featureFlags, IOptionsSnapshot <Auxiliary2AzureSearchConfiguration> options, IAzureSearchTelemetryService telemetryService, ILogger <Auxiliary2AzureSearchCommand> logger) { _auxiliaryFileClient = auxiliaryFileClient ?? throw new ArgumentException(nameof(auxiliaryFileClient)); _databaseFetcher = databaseFetcher ?? throw new ArgumentNullException(nameof(databaseFetcher)); _downloadDataClient = downloadDataClient ?? throw new ArgumentNullException(nameof(downloadDataClient)); _downloadSetComparer = downloadSetComparer ?? throw new ArgumentNullException(nameof(downloadSetComparer)); _downloadTransferrer = downloadTransferrer ?? throw new ArgumentNullException(nameof(downloadTransferrer)); _popularityTransferDataClient = popularityTransferDataClient ?? throw new ArgumentNullException(nameof(popularityTransferDataClient)); _searchDocumentBuilder = searchDocumentBuilder ?? throw new ArgumentNullException(nameof(searchDocumentBuilder)); _indexActionBuilder = indexActionBuilder ?? throw new ArgumentNullException(nameof(indexActionBuilder)); _batchPusherFactory = batchPusherFactory ?? throw new ArgumentNullException(nameof(batchPusherFactory)); _systemTime = systemTime ?? throw new ArgumentNullException(nameof(systemTime)); _featureFlags = featureFlags ?? throw new ArgumentNullException(nameof(featureFlags)); _options = options ?? throw new ArgumentNullException(nameof(options)); _telemetryService = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _stringCache = new StringCache(); if (_options.Value.MaxConcurrentBatches <= 0) { throw new ArgumentOutOfRangeException( nameof(options), $"The {nameof(AzureSearchJobConfiguration.MaxConcurrentBatches)} must be greater than zero."); } if (_options.Value.MaxConcurrentVersionListWriters <= 0) { throw new ArgumentOutOfRangeException( nameof(options), $"The {nameof(AzureSearchJobConfiguration.MaxConcurrentVersionListWriters)} must be greater than zero."); } }