Class AzureDocumentDbDataStoreConnectionStringFactory
A factory for getting connections and database names for IDataStore<TData> access.
Inheritance
System.Object
AzureDocumentDbDataStoreConnectionStringFactory
Namespace: Cqrs.Azure.DocumentDb.Factories
Assembly: Cqrs.Azure.DocumentDb.dll
Syntax
public class AzureDocumentDbDataStoreConnectionStringFactory : object, IAzureDocumentDbDataStoreConnectionStringFactory
Constructors
AzureDocumentDbDataStoreConnectionStringFactory(ILogger, IConfigurationManager)
Instantiates a new instance of AzureDocumentDbDataStoreConnectionStringFactory.
Declaration
public AzureDocumentDbDataStoreConnectionStringFactory(ILogger logger, IConfigurationManager configurationManager)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | |
IConfigurationManager | configurationManager |
Properties
ConfigurationManager
Gets or sets the IConfigurationManager.
Declaration
protected IConfigurationManager ConfigurationManager { get; }
Property Value
Type | Description |
---|---|
IConfigurationManager |
Logger
Gets or sets the
Declaration
protected ILogger Logger { get; }
Property Value
Type | Description |
---|---|
ILogger |
Methods
GetAzureDocumentDbAuthorisationKey()
Gets the current connection authorisation key from the ConfigurationManager.
Declaration
protected virtual string GetAzureDocumentDbAuthorisationKey()
Returns
Type | Description |
---|---|
System.String |
GetAzureDocumentDbCollectionName()
Gets the current collection name.
Declaration
public virtual string GetAzureDocumentDbCollectionName()
Returns
Type | Description |
---|---|
System.String |
Implements
GetAzureDocumentDbConnectionClient()
Gets the current
Declaration
public virtual DocumentClient GetAzureDocumentDbConnectionClient()
Returns
Type | Description |
---|---|
DocumentClient |
Implements
GetAzureDocumentDbConnectionUrl()
Gets the current connection
Declaration
protected virtual Uri GetAzureDocumentDbConnectionUrl()
Returns
Type | Description |
---|---|
Uri |
GetAzureDocumentDbDatabaseName()
Gets the current database name.
Declaration
public virtual string GetAzureDocumentDbDatabaseName()
Returns
Type | Description |
---|---|
System.String |
Implements
UseSingleCollectionForAllDataStores()
Indicates if a different collection should be used per IEntity/IDataStore<TData> or a single collection used for all instances of IDataStore<TData> and IDataStore<TData>. Setting this to true can become expensive as each IEntity will have it's own collection. Check the relevant SDK/pricing models.
Declaration
public virtual bool UseSingleCollectionForAllDataStores()
Returns
Type | Description |
---|---|
System.Boolean |