Class AbstractEntityManager
This abstract class implements a subset of dependencies used to
map input data objects to concrete entity related model objects.
Inheritance
System.Object
AbstractEntityManager
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: Mars.Core.Data
Assembly: Mars.Core.dll
Syntax
public abstract class AbstractEntityManager : DomainDataMediatorImpl
Constructors
| Improve this Doc View SourceAbstractEntityManager(IConfigLoader, ReflectiveMapping)
This class is responsible for the entity mapping using reflection, JIT proxies
and the simulation config.
Declaration
protected AbstractEntityManager(IConfigLoader configLoader, ReflectiveMapping reflectiveMappingWorkflow)
Parameters
Type | Name | Description |
---|---|---|
IConfigLoader | configLoader | The config loader holding a reference to the actual simulation config. |
ReflectiveMapping | reflectiveMappingWorkflow | A reflection-based mapper. |
Properties
| Improve this Doc View SourceConfigLoader
Get the loader holding a reference to the actual simulation
config and the static model description.
Declaration
protected IConfigLoader ConfigLoader { get; }
Property Value
Type | Description |
---|---|
IConfigLoader |
Mappings
Gets and initializes a collection of all mappings
from a precise type to their mapping of the config.
Declaration
protected IDictionary<Type, TypeMapping> Mappings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.Type, TypeMapping> |
MappingWorkflow
This sub-component maps the input of a concrete data object to
the constructor or properties of a model object.
Declaration
protected ReflectiveMapping MappingWorkflow { get; }
Property Value
Type | Description |
---|---|
ReflectiveMapping |
Methods
| Improve this Doc View SourceCreate<TEntity>(IReadOnlyCollection<IModelObject>, TypeMapping, TypeElement, IEnumerable<IDomainData>)
Creates concrete
TEntity
with the given dependencies and data objects
describing the entity.
Declaration
protected IEnumerable<TEntity> Create<TEntity>(IReadOnlyCollection<IModelObject> dependencies, TypeMapping mapping, TypeElement modelType, IEnumerable<IDomainData> dataObjects)
where TEntity : IEntity, new()
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IReadOnlyCollection<IModelObject> | dependencies | Required dependencies such as other layers or environments. |
TypeMapping | mapping | The concrete mapping for this type and the reference to made configurations. |
TypeElement | modelType | The static model description of this type with its input properties, inheritance etc. |
System.Collections.Generic.IEnumerable<IDomainData> | dataObjects | A set of data objects where each TEntity shall be constructed from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TEntity> |
Returns an iterator over a construction of TEntities 's as long the data object provide new data
or when no data is provided the user has limit the set by calling Take(nthElements)
|
Type Parameters
Name | Description |
---|---|
TEntity | The concrete type to return. |
Remarks
This construction is an infinite iterator based construction when no data objects are provided to this method.
This means the call have to limit the set of returned objects.