Interface IAzureDocumentDbConnectionCache
A cache manager for DocumentDB clients, databases and collections.
Namespace: Cqrs.Azure.DocumentDb
Assembly: Cqrs.Azure.DocumentDb.dll
Syntax
public interface IAzureDocumentDbConnectionCache
Methods
SetClient(String, DocumentClient)
Sets the provided client
.
Declaration
void SetClient(string key, DocumentClient client)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
DocumentClient | client | The |
SetDatabase(String, Database)
Sets the provided database
.
Declaration
void SetDatabase(string key, Database database)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
Database | database | The |
SetDocumentCollection(String, DocumentCollection)
Sets the provided documentCollection
.
Declaration
void SetDocumentCollection(string key, DocumentCollection documentCollection)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
DocumentCollection | documentCollection | The |
TryGetClient(String, out DocumentClient)
Gets the
Declaration
bool TryGetClient(string key, out DocumentClient client)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
DocumentClient | client | If the |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
TryGetDatabase(String, out Database)
Gets the
Declaration
bool TryGetDatabase(string key, out Database database)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
Database | database | If the |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
TryGetDocumentCollection(String, out DocumentCollection)
Gets the
Declaration
bool TryGetDocumentCollection(string key, out DocumentCollection documentCollection)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The name of the |
DocumentCollection | documentCollection | If the |
Returns
Type | Description |
---|---|
System.Boolean | true if the |