public AzureSearchCollectorLogic( ICatalogIndexActionBuilder indexActionBuilder, Func <IBatchPusher> batchPusherFactory, IDocumentFixUpEvaluator fixUpEvaluator, CommitCollectorUtility utility, IOptionsSnapshot <Catalog2AzureSearchConfiguration> options, IAzureSearchTelemetryService telemetryService, ILogger <AzureSearchCollectorLogic> logger) { _indexActionBuilder = indexActionBuilder ?? throw new ArgumentNullException(nameof(indexActionBuilder)); _batchPusherFactory = batchPusherFactory ?? throw new ArgumentNullException(nameof(batchPusherFactory)); _fixUpEvaluator = fixUpEvaluator ?? throw new ArgumentNullException(nameof(fixUpEvaluator)); _utility = utility ?? throw new ArgumentNullException(nameof(utility)); _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."); } }