Class DefaultDataContextFactory
Default implementation of a IDataContextFactory.
Inheritance
System.Object
DefaultDataContextFactory
Implements
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)
System.Object.ToString()
Namespace: Kephas.Data
Assembly: Kephas.Data.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultDataContextFactory : IDataContextFactory
Constructors
| Improve this Doc View SourceDefaultDataContextFactory(ICollection<IExportFactory<IDataContext, DataContextMetadata>>, IDataStoreProvider)
Initializes a new instance of the DefaultDataContextFactory class.
Declaration
public DefaultDataContextFactory(ICollection<IExportFactory<IDataContext, DataContextMetadata>> dataContextFactories, IDataStoreProvider dataStoreProvider)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<IExportFactory<IDataContext, DataContextMetadata>> | dataContextFactories | The data context factories. |
IDataStoreProvider | dataStoreProvider | The data store provider. |
Methods
| Improve this Doc View SourceComputeDataContextExportFactory(IDataStore)
Calculates the data context export factory for the provided data source name.
Declaration
protected virtual IExportFactory<IDataContext> ComputeDataContextExportFactory(IDataStore dataStore)
Parameters
Type | Name | Description |
---|---|---|
IDataStore | dataStore | The data store. |
Returns
Type | Description |
---|---|
IExportFactory<IDataContext> | The calculated data context export factory. |
CreateDataContext(String, IContext)
Creates a data context for the provided data store name.
Declaration
public IDataContext CreateDataContext(string dataStoreName, IContext initializationContext = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataStoreName | Name of the data store. |
IContext | initializationContext | An initialization context (optional). |
Returns
Type | Description |
---|---|
IDataContext | The newly created data context. |
CreateDataInitializationContext(IDataContext, IDataStore, IContext)
Creates the data initialization context.
Declaration
protected virtual IDataInitializationContext CreateDataInitializationContext(IDataContext dataContext, IDataStore dataStore, IContext initializationContext)
Parameters
Type | Name | Description |
---|---|---|
IDataContext | dataContext | Context for the data. |
IDataStore | dataStore | The data store. |
IContext | initializationContext | An initialization context. |
Returns
Type | Description |
---|---|
IDataInitializationContext | The new data initialization context. |