예제 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing && _search != null)
     {
         _search.Dispose();
         _search = null;
     }
 }
예제 #2
0
 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);
        }
예제 #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (!disposedValue)
     {
         if (disposing)
         {
             _client.Dispose();
         }
         disposedValue = true;
     }
 }
예제 #5
0
        public void Dispose()
        {
            foreach (var client in _clients.Values)
            {
                client.Dispose();
            }

            foreach (var indexer in _indexers)
            {
                indexer.Dispose();
            }

            if (createdSearchServiceClient)
            {
                _client?.Dispose();
            }
        }
예제 #6
0
        protected virtual void Dispose(bool disposing)
        {
            if (_disposed)
            {
                return;
            }

            if (disposing)
            {
                _serviceClient.Dispose();
                _serviceClient = null;

                _searchClient.Dispose();
                _searchClient = null;

                _indexClient.Dispose();
                _indexClient = null;
            }

            _disposed = true;
        }
예제 #7
0
        public void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            foreach (var indexer in _indexers)
            {
                indexer.Dispose();
            }

            foreach (var client in _clients.Values)
            {
                client.Dispose();
            }

            if (createdSearchServiceClient)
            {
                _client?.Dispose();
            }

            _disposed = true;
        }
 public void Dispose()
 {
     indexClient.Dispose();
     serviceClient.Dispose();
 }
 public void Dispose()
 {
     _serviceClient.Dispose();
 }
 public void Dispose()
 {
     _client?.Dispose();
 }