Class AbstractEntityMapper
Provides a base implementation for the IGeneratedEntityLogger interface for all agent entities
which can be serialize/deserialized.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Core.Data.Compiler
Assembly: Mars.Core.dll
Syntax
public abstract class AbstractEntityMapper : AbstractMapper<IEntity>, IGeneratedEntityLogger, IGeneratedLogger<IEntity>, IOutputLogger
Remarks
The concrete implementations are generated at runtime by the Mars.Core.Data.Compiler.ProxyEntityGenerator
Properties
| Improve this Doc View SourcePosition
Provides a base implementation for the IGeneratedEntityLogger interface for all agent entities
which can be serialize/deserialized.
Declaration
[IgnoreMember]
[JsonProperty(PropertyName = "position", NullValueHandling = NullValueHandling.Ignore)]
[BsonElement("position")]
[BsonIgnoreIfNull]
[NotMapped]
public Position Position { get; }
Property Value
Type | Description |
---|---|
Position |
Remarks
The concrete implementations are generated at runtime by the Mars.Core.Data.Compiler.ProxyEntityGenerator
Methods
| Improve this Doc View SourceInitialize()
Performs a deferred initialization of this entity-specific mapper.
This makes it possible to assign properties with values before
(e.g., the concrete entity ).
Declaration
public override void Initialize()
Overrides
Mars.Core.Data.Compiler.AbstractMapper<Mars.Interfaces.Agents.IEntity>.Initialize()
Remarks
This method should always be used when something have to be implemented within the constructor scope.
|
Improve this Doc
View Source
IsPositionSerializable(BoundingBox)
Checks for the current instance, based on their position whether this instance is within the bounding box or not.
Declaration
public bool IsPositionSerializable(BoundingBox box)
Parameters
Type | Name | Description |
---|---|---|
BoundingBox | box | The bounding box with lower left and upper right corner specification to check whether the position is in that box. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true when the instance can be serialized otherwise false |
Remarks
The concrete implementations are generated at runtime by the Mars.Core.Data.Compiler.ProxyEntityGenerator
|
Improve this Doc
View Source
SerializeToDocument()
Serialize this instance of the proxy with the corresponding output
properties described in TypeElement into a MongoDb
conforming MongoDB.Bson.BsonDocument which is reused for each tick.
Declaration
public override BsonDocument SerializeToDocument()
Returns
Type | Description |
---|---|
MongoDB.Bson.BsonDocument |
Overrides
Mars.Core.Data.Compiler.AbstractMapper<Mars.Interfaces.Agents.IEntity>.SerializeToDocument()
Remarks
The concrete implementations are generated at runtime by the Mars.Core.Data.Compiler.ProxyEntityGenerator