Class MongoDbDataStoreBase
Implements MongoDB store base functionality Connect string takes form of:
mongo{server="mongo://localhost:27017" db="myDB"}
Inheritance
System.Object
MongoDbDataStoreBase
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Azos.Data.Access.MongoDb
Assembly: Azos.MongoDb.dll
Syntax
public abstract class MongoDbDataStoreBase : ApplicationComponent, IDataStoreImplementation, IDataStore, IApplicationComponent, IDisposable, IConfigurable, IInstrumentable, IExternallyParameterized
Constructors
MongoDbDataStoreBase(IApplicationComponent)
Declaration
protected MongoDbDataStoreBase(IApplicationComponent director)
Parameters
Type | Name | Description |
---|---|---|
IApplicationComponent | director |
MongoDbDataStoreBase(IApplication)
Declaration
protected MongoDbDataStoreBase(IApplication app)
Parameters
Type | Name | Description |
---|---|---|
IApplication | app |
Properties
ComponentLogTopic
Declaration
public override string ComponentLogTopic { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
ConnectString
Get/Sets MongoDB database connection string
Declaration
[Config("$connect-string")]
public string ConnectString { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DatabaseName
Get/Sets MongoDB database name
Declaration
[Config("$db-name")]
public string DatabaseName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ExternalParameters
Returns named parameters that can be used to control this component
Declaration
public IEnumerable<KeyValuePair<string, Type>> ExternalParameters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> |
InstrumentationEnabled
Declaration
[Config(Default = false)]
[ExternalParameter(new string[]{"data", "instrumentation"})]
public bool InstrumentationEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LogLevel
Declaration
[Config]
public StoreLogLevel LogLevel { get; set; }
Property Value
Type | Description |
---|---|
StoreLogLevel |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
TargetName
Declaration
[Config]
public string TargetName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Configure(IConfigSectionNode)
Declaration
public virtual void Configure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
ExternalGetParameter(String, out Object, String[])
Gets external parameter value returning true if parameter was found
Declaration
public bool ExternalGetParameter(string name, out object value, params string[] groups)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Object | value | |
System.String[] | groups |
Returns
Type | Description |
---|---|
System.Boolean |
ExternalParametersForGroups(String[])
Returns named parameters that can be used to control this component
Declaration
public IEnumerable<KeyValuePair<string, Type>> ExternalParametersForGroups(params string[] groups)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | groups |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Type>> |
ExternalSetParameter(String, Object, String[])
Sets external parameter value returning true if parameter was found and set
Declaration
public bool ExternalSetParameter(string name, object value, params string[] groups)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | |
System.Object | value | |
System.String[] | groups |
Returns
Type | Description |
---|---|
System.Boolean |
GetDatabase()
Gets appropriate database. It does not need to be disposed
Declaration
protected Database GetDatabase()
Returns
Type | Description |
---|---|
Database |
TestConnection()
Declaration
public void TestConnection()
Implements
System.IDisposable