Class BlobStorageDataStoreConnectionStringFactory
A factory for getting connection strings and container names for IDataStore<TData> access.
This factory supports reading and writing from separate storage accounts. Specifically you can have as many different storage accounts as you want to configure when writing.
This allows for manual mirroring of data while reading from the fastest/closest location possible.
Inheritance
System.Object
BlobStorageDataStoreConnectionStringFactory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Cqrs.Azure.BlobStorage.dll
Syntax
public class BlobStorageDataStoreConnectionStringFactory : IBlobStorageDataStoreConnectionStringFactory, IBlobStorageStoreConnectionStringFactory, IStorageStoreConnectionStringFactory
Constructors
BlobStorageDataStoreConnectionStringFactory(IConfigurationManager, ILogger)
Declaration
public BlobStorageDataStoreConnectionStringFactory(IConfigurationManager configurationManager, ILogger logger)
Parameters
Fields
BlobStorageBaseContainerNameKey
Declaration
public static string BlobStorageBaseContainerNameKey
Field Value
Type |
Description |
System.String |
|
BlobStorageDataStoreConnectionStringKey
The name of the app setting in IConfigurationManager that will have the connection string if using a single storage account for both reads and writes.
Declaration
public static string BlobStorageDataStoreConnectionStringKey
Field Value
Type |
Description |
System.String |
|
BlobStorageIsContainerPublicKey
The name of the app setting in IConfigurationManager that will indicate if the container is public or not.
Declaration
public static string BlobStorageIsContainerPublicKey
Field Value
Type |
Description |
System.String |
|
BlobStorageReadableDataStoreConnectionStringKey
The name of the app setting in IConfigurationManager that will have the connection string of the readable storage account if using a separate storage account for reads and writes.
Declaration
public static string BlobStorageReadableDataStoreConnectionStringKey
Field Value
Type |
Description |
System.String |
|
BlobStorageWritableDataStoreConnectionStringKey
The name of the app setting in IConfigurationManager that will have the connection string of the writeable storage account if using a separate storage account for reads and writes.
This value gets appended with a ".1", ".2" etc allowing you to write to as many different locations as possible.
Declaration
public static string BlobStorageWritableDataStoreConnectionStringKey
Field Value
Type |
Description |
System.String |
|
Properties
ConfigurationManager
Declaration
protected IConfigurationManager ConfigurationManager { get; }
Property Value
Logger
Gets or sets the cdmdotnet.Logging.ILogger.
Declaration
protected ILogger Logger { get; }
Property Value
Type |
Description |
cdmdotnet.Logging.ILogger |
|
Methods
GetBaseContainerName()
Declaration
public virtual string GetBaseContainerName()
Returns
Type |
Description |
System.String |
|
Implements
GetContainerName<TData>()
Declaration
public virtual string GetContainerName<TData>()where TData : Entity
Returns
Type Parameters
Implements
GetEntityName<TData>()
Gets the name of the entity that is safe for container use.
Declaration
public virtual string GetEntityName<TData>()where TData : Entity
Returns
Type |
Description |
System.String |
|
Type Parameters
Implements
GetReadableConnectionString()
Declaration
public virtual string GetReadableConnectionString()
Returns
Type |
Description |
System.String |
|
Implements
GetWritableConnectionStrings()
Declaration
public virtual IEnumerable<string> GetWritableConnectionStrings()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Implements
IsContainerPublic<TData>()
Get if the container is public or not.
Declaration
public virtual bool IsContainerPublic<TData>()where TData : Entity
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Implements