Class AgentManagerImpl
This class implements the entity management with construction, destruction query capabilities
to interact with agent types.
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: Mars.Core.Data
Assembly: Mars.Core.dll
Syntax
public class AgentManagerImpl : AbstractEntityManager, IAgentManager
Constructors
| Improve this Doc View SourceAgentManagerImpl(IConfigLoader, IRuntimeModel, IModelResolver, ISerializerManager)
Creates a new IAgentManager with a custom
mapping implementation Mars.Core.Data.Mapping.AgentReflectiveMapping
suitable for all agent specific properties such as layers and
un-/registration handles.
Declaration
public AgentManagerImpl(IConfigLoader configLoader, IRuntimeModel runtimeModel, IModelResolver modelResolver, ISerializerManager serializerManager)
Parameters
Type | Name | Description |
---|---|---|
IConfigLoader | configLoader | The config loader holding all references to mappings and type descriptions. |
IRuntimeModel | runtimeModel | The runtime model with all registered agents, layer and entity objects. |
IModelResolver | modelResolver | The resolver to get all automatically created layer singleton instances. |
ISerializerManager | serializerManager | The serializer to register/unregister entities for in-/output. |
Methods
| Improve this Doc View SourceCreate<TAgent>(List<IModelObject>)
This class implements the entity management with construction, destruction query capabilities
to interact with agent types.
Declaration
public IEnumerable<TAgent> Create<TAgent>(List<IModelObject> dependencies = null)
where TAgent : IAgent
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IModelObject> | dependencies |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAgent> |
Type Parameters
Name | Description |
---|---|
TAgent |
Create<TAgent, TLayer>(IEnumerable<IDomainData>, List<IModelObject>, Action<TAgent>)
Creates concrete
TAgent
from the given set of data objects describing the entity.
Declaration
public IEnumerable<TAgent> Create<TAgent, TLayer>(IEnumerable<IDomainData> data, List<IModelObject> dependencies, Action<TAgent> assignment)
where TAgent : IAgent<TLayer>, new()
where TLayer : ILayer
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IDomainData> | data | The set of data object from which to construct the agent. |
System.Collections.Generic.List<IModelObject> | dependencies | Required dependencies such as other layers or environments. |
System.Action<TAgent> | assignment | An optional data assignment delegate, can be used before the Init(TLayer) method is called but after the construction has been done. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAgent> |
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 |
---|---|
TAgent | The concrete agent type to create and return. |
TLayer | The concrete layer type to resolve for this agent. |
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.
|
Improve this Doc
View Source
Create<TAgent, TLayer>(List<IModelObject>, Action<TAgent>)
This class implements the entity management with construction, destruction query capabilities
to interact with agent types.
Declaration
public IEnumerable<TAgent> Create<TAgent, TLayer>(List<IModelObject> dependencies = null, Action<TAgent> assignment = null)
where TAgent : IAgent<TLayer>, new()
where TLayer : ILayer
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IModelObject> | dependencies | |
System.Action<TAgent> | assignment |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAgent> |
Type Parameters
Name | Description |
---|---|
TAgent | |
TLayer |
Spawn<TAgent>(List<IModelObject>)
Creates concrete
TAgent
and registers the at the runtime system, The object is constructed
with the given dependencies and data objects describing the entity.
Declaration
public IEnumerable<TAgent> Spawn<TAgent>(List<IModelObject> dependencies = null)
where TAgent : IAgent
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IModelObject> | dependencies | Required dependencies such as other layers or environments. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAgent> |
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 |
---|---|
TAgent | The concrete agent type to create and 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.
|
Improve this Doc
View Source
Spawn<TAgent, TLayer>(List<IModelObject>, Action<TAgent>)
Creates concrete
TAgent
and registers the at the runtime system, The object is constructed
with the given dependencies and data objects describing the entity.
Declaration
public IEnumerable<TAgent> Spawn<TAgent, TLayer>(List<IModelObject> dependencies = null, Action<TAgent> assignment = null)
where TAgent : IAgent<TLayer>, new()
where TLayer : ILayer
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<IModelObject> | dependencies | Required dependencies such as other layers or environments. |
System.Action<TAgent> | assignment | An optional data assignment delegate, can be used before the Init(TLayer) method is called but after the construction has been done. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TAgent> |
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 |
---|---|
TAgent | The concrete agent type to create and return. |
TLayer | The concrete layer type to resolve for this agent. |
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.