Пример #1
0
 public SearchIndexActionBuilder(
     IVersionListDataClient versionListDataClient,
     ILogger <SearchIndexActionBuilder> logger)
 {
     _versionListDataClient = versionListDataClient ?? throw new ArgumentNullException(nameof(versionListDataClient));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #2
0
 public DocumentFixUpEvaluator(
     IVersionListDataClient versionListClient,
     ICatalogLeafFetcher leafFetcher,
     ILogger <DocumentFixUpEvaluator> logger)
 {
     _versionListClient = versionListClient ?? throw new ArgumentNullException(nameof(versionListClient));
     _leafFetcher       = leafFetcher ?? throw new ArgumentNullException(nameof(leafFetcher));
     _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));
 }
Пример #4
0
        public BatchPusher(
            ISearchIndexClientWrapper searchIndexClient,
            ISearchIndexClientWrapper hijackIndexClient,
            IVersionListDataClient versionListDataClient,
            IOptionsSnapshot <AzureSearchJobConfiguration> options,
            IOptionsSnapshot <AzureSearchJobDevelopmentConfiguration> developmentOptions,
            IAzureSearchTelemetryService telemetryService,
            ILogger <BatchPusher> logger)
        {
            _searchIndexClient     = searchIndexClient ?? throw new ArgumentNullException(nameof(searchIndexClient));
            _hijackIndexClient     = hijackIndexClient ?? throw new ArgumentNullException(nameof(hijackIndexClient));
            _versionListDataClient = versionListDataClient ?? throw new ArgumentNullException(nameof(versionListDataClient));
            _options            = options ?? throw new ArgumentNullException(nameof(options));
            _developmentOptions = developmentOptions ?? throw new ArgumentNullException(nameof(developmentOptions));
            _telemetryService   = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
            _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
            _idReferenceCount   = new Dictionary <string, int>(StringComparer.OrdinalIgnoreCase);

            _searchActions          = new Queue <IdAndValue <IndexAction <KeyedDocument> > >();
            _hijackActions          = new Queue <IdAndValue <IndexAction <KeyedDocument> > >();
            _versionListDataResults = new Dictionary <string, ResultAndAccessCondition <VersionListData> >();

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

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