/// <summary> /// Dispose of cosmos client /// </summary> /// <param name="disposing">True if disposing</param> protected virtual void Dispose(bool disposing) { if (this.DocumentClient != null) { this.DocumentClient.Dispose(); this.DocumentClient = null; } if (this.BatchExecutorCache != null) { this.BatchExecutorCache.Dispose(); this.BatchExecutorCache = null; } }
private ClientContextCore( CosmosClient client, CosmosClientOptions clientOptions, CosmosSerializerCore serializerCore, CosmosResponseFactoryInternal cosmosResponseFactory, RequestInvokerHandler requestHandler, DocumentClient documentClient, string userAgent, BatchAsyncContainerExecutorCache batchExecutorCache) { this.client = client; this.clientOptions = clientOptions; this.serializerCore = serializerCore; this.responseFactory = cosmosResponseFactory; this.requestHandler = requestHandler; this.documentClient = documentClient; this.userAgent = userAgent; this.batchExecutorCache = batchExecutorCache; }