public static void EnsureValid(this AzureSearchOptions options) { if (options == null) { CoreOptionsExtensions.ThrowMissingConfiguration(nameof(BaGetOptions.Search)); } if (string.IsNullOrEmpty(options.AccountName)) { CoreOptionsExtensions.ThrowMissingConfiguration( nameof(BaGetOptions.Search), nameof(AzureSearchOptions.AccountName)); } if (string.IsNullOrEmpty(options.AccountName)) { CoreOptionsExtensions.ThrowMissingConfiguration( nameof(BaGetOptions.Search), nameof(AzureSearchOptions.ApiKey)); } }
public AzureSearchMockData(IOptions <SearchOptions> azureSearchOptions, NewsContext context) { _context = context; _azureSearchOptions = azureSearchOptions.Value.AzureSearch; }
public AzureSearchService(IOptions <AzureSearchOptions> options, IMapper mapper) { _options = options.Value; _mapper = mapper; }
private static SearchIndexClient CreateClient(AzureSearchOptions options) { return(new SearchIndexClient(options.SearchServiceName, options.IndexName, new SearchCredentials(options.SearchServiceQueryApiKey))); }
public AzureSearchService(IOptions <DevnotOptions> azureSearchOptions) { _azureSearchOptions = azureSearchOptions.Value.SearchEngine.AzureSearch; }
public AzureSearchIndexer(IOptions <AzureSearchOptions> options, IMapper mapper) { _options = options.Value; _mapper = mapper; }