public SearchWriteClient(SearchClientConfiguration searchClientConfiguration) { _searchIndexClient = new SearchIndexClient(new Uri(searchClientConfiguration.EndPoint), new AzureKeyCredential(searchClientConfiguration.ApiKey)); }
public static IServiceCollection InstallSearchEngine(this IServiceCollection serviceCollection, SearchClientConfiguration searchClientConfiguration) { serviceCollection.AddSingleton(searchClientConfiguration); serviceCollection.AddTransient <ISearchWriteClient, SearchWriteClient>(); return(serviceCollection); }