public void Dispose()
 {
     _indexer?.Dispose();
     if (_client.IsValueCreated)
     {
         _client.Value.Dispose();
     }
 }
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _searchIndexClient?.Dispose();
         _searchServiceClient?.Dispose();
     }
 }
        public void Initialize()
        {
            // add for Azure Seach SockeException  under .net 4.5.2
            System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;

            if (_searchClient != null)
            {
                _searchClient.Dispose();
            }
            if (_indexClient != null)
            {
                _indexClient.Dispose();
            }

            // 検索クライアント初期化
            _searchClient = new SearchServiceClient(SearchServiceName, new SearchCredentials(SearchServiceApiKey));
            _indexClient  = _searchClient.Indexes.GetClient(SearchIndex);
        }
Exemple #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             // TODO: Check if its the good way to get ride of him
             indexClientForQueries.Dispose();
             indexClientForQueries = null;
         }
     }
     this.disposed = true;
 }
 public void Dispose()
 {
     indexClient.Dispose();
     serviceClient.Dispose();
 }
 public virtual void Dispose()
 {
     IndexClient?.Dispose();
 }
Exemple #7
0
 public void Dispose()
 {
     _indexClient?.Dispose();
 }