Class MongoDataStoreConnectionStringFactory
A factory for MongoDb related connection string settings.
Inheritance
System.Object
MongoDataStoreConnectionStringFactory
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()
Namespace: Cqrs.Mongo.Factories
Assembly: Cqrs.Mongo.dll
Syntax
public class MongoDataStoreConnectionStringFactory : IMongoDataStoreConnectionStringFactory
Constructors
MongoDataStoreConnectionStringFactory(IConfigurationManager, ILogger)
Instantiate a new instance of MongoDataStoreConnectionStringFactory.
Declaration
public MongoDataStoreConnectionStringFactory(IConfigurationManager configurationManager, ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
IConfigurationManager | configurationManager | |
cdmdotnet.Logging.ILogger | logger |
Fields
MongoDbConnectionStringKey
The name of the app setting in IConfigurationManager that will have the name of the connection string of the MongoDB server.
Declaration
public static string MongoDbConnectionStringKey
Field Value
Type | Description |
---|---|
System.String |
MongoDbDatabaseNameKey
The name of the app setting in IConfigurationManager that will have the name of the database.
Declaration
public static string MongoDbDatabaseNameKey
Field Value
Type | Description |
---|---|
System.String |
OldMongoDbConnectionStringKey
Backwards compatibility with version 1.
Declaration
public static string OldMongoDbConnectionStringKey
Field Value
Type | Description |
---|---|
System.String |
OldMongoDbDatabaseNameKey
Backwards compatibility with version 1.
Declaration
public static string OldMongoDbDatabaseNameKey
Field Value
Type | Description |
---|---|
System.String |
Properties
ConfigurationManager
Gets or sets the IConfigurationManager.
Declaration
protected IConfigurationManager ConfigurationManager { get; }
Property Value
Type | Description |
---|---|
IConfigurationManager |
Logger
Gets or sets the cdmdotnet.Logging.ILogger.
Declaration
protected ILogger Logger { get; }
Property Value
Type | Description |
---|---|
cdmdotnet.Logging.ILogger |
Methods
GetMongoConnectionString()
Get the connection string for the MongoDB server.
Declaration
public string GetMongoConnectionString()
Returns
Type | Description |
---|---|
System.String |
Implements
GetMongoDatabaseName()
Get the name of database on the MongoDB server.
Declaration
public string GetMongoDatabaseName()
Returns
Type | Description |
---|---|
System.String |