Zum Hauptinhalt springen

EntityRuleEngineResult<TEntity>

Namespace: Meshmakers.Octo.Runtime.Contracts.RuleEngine

Represents a result of a rule engine execution.

public record EntityRuleEngineResult<TEntity> : IEquatable<EntityRuleEngineResult<TEntity>>

Type Parameters​

TEntity

Inheritance Object → EntityRuleEngineResult<TEntity>
Implements IEquatable<EntityRuleEngineResult<TEntity>>

Properties​

RtEntitiesToInsert​

Returns a list of entities to create.

public List<TEntity> RtEntitiesToInsert { get; }

Property Value​

List<TEntity>

RtEntitiesToUpdate​

Returns a list of entities to update.

public Dictionary<RtEntityId, TEntity> RtEntitiesToUpdate { get; }

Property Value​

Dictionary<RtEntityId, TEntity>

RtEntitiesToReplace​

Returns a list of entities to replace.

public Dictionary<RtEntityId, TEntity> RtEntitiesToReplace { get; }

Property Value​

Dictionary<RtEntityId, TEntity>

RtEntitiesToDelete​

Returns a list of entities to delete.

public List<RtEntityId> RtEntitiesToDelete { get; }

Property Value​

List<RtEntityId>

UpdateGuards​

Optimistic-concurrency guards keyed by entity id. An entry indicates that the corresponding update in EntityRuleEngineResult<TEntity>.RtEntitiesToUpdate must be applied conditionally — see AttributeNewerThanGuard for semantics. Entities without a guard are updated unconditionally.

public Dictionary<RtEntityId, AttributeNewerThanGuard> UpdateGuards { get; }

Property Value​

Dictionary<RtEntityId, AttributeNewerThanGuard>

Constructors​

EntityRuleEngineResult()​

Creates a new instance of EntityRuleEngineResult<TEntity>.

public EntityRuleEngineResult()

EntityRuleEngineResult(List<TEntity>, Dictionary<RtEntityId, TEntity>, Dictionary<RtEntityId, TEntity>, List<RtEntityId>, Dictionary<RtEntityId, AttributeNewerThanGuard>)​

Creates a new instance of EntityRuleEngineResult<TEntity>.

public EntityRuleEngineResult(List<TEntity> rtEntitiesToInsert, Dictionary<RtEntityId, TEntity> rtEntitiesToUpdate, Dictionary<RtEntityId, TEntity> rtEntitiesToReplace, List<RtEntityId> rtEntitiesToDelete, Dictionary<RtEntityId, AttributeNewerThanGuard> updateGuards)

Parameters​

rtEntitiesToInsert List<TEntity>
List of entities to create.

rtEntitiesToUpdate Dictionary<RtEntityId, TEntity>
List of entities to update.

rtEntitiesToReplace Dictionary<RtEntityId, TEntity>
List of entities to replace.

rtEntitiesToDelete List<RtEntityId>
List of entities to delete.

updateGuards Dictionary<RtEntityId, AttributeNewerThanGuard>
Optional optimistic-concurrency guards keyed by entity id. Entries are present only for entries in rtEntitiesToUpdate that were created via EntityUpdateInfo<TEntity>.CreateConditionalUpdate(RtEntityId, TEntity, AttributeNewerThanGuard).