EntityUpdateInfo<TEntity>
Namespace: Meshmakers.Octo.Runtime.Contracts
Represents an entity update info.
public class EntityUpdateInfo<TEntity> : IEntityUpdateInfo<TEntity>
Type Parameters
TEntity
Inheritance Object → EntityUpdateInfo<TEntity>
Implements IEntityUpdateInfo<TEntity>
Properties
RtEntity
public TEntity RtEntity { get; }
Property Value
TEntity
RtId
public Nullable<OctoObjectId> RtId { get; }
Property Value
CkTypeId
public RtCkId<CkTypeId> CkTypeId { get; }
Property Value
RtCkId<CkTypeId>
ModOption
MOD option.
public EntityModOptions ModOption { get; }
Property Value
UpdateGuard
public AttributeNewerThanGuard UpdateGuard { get; }
Property Value
Remarks:
Not serialized — the guard is meaningful only in-process at write time, not on the wire. Cross-process consumers should call EntityUpdateInfo<TEntity>.CreateConditionalUpdate(RtEntityId, TEntity, AttributeNewerThanGuard) themselves if they need OCC.
Methods
GetRtEntityId()
public RtEntityId GetRtEntityId()
Returns
RtEntityId
CreateInsert(RtCkId<CkTypeId>, TEntity)
Creates a new instance of EntityUpdateInfo<TEntity> for insert.
public static EntityUpdateInfo<TEntity> CreateInsert(RtCkId<CkTypeId> ckTypeId, TEntity rtEntity)
Parameters
ckTypeId RtCkId<CkTypeId>
Type identifier of the construction kit
rtEntity TEntity
Runtime entity to insert
Returns
CreateInsert(TEntity)
Creates a new instance of EntityUpdateInfo<TEntity> for insert.
public static EntityUpdateInfo<TEntity> CreateInsert(TEntity rtEntity)
Parameters
rtEntity TEntity
Runtime entity to insert
Returns
CreateDelete(RtEntityId)
Creates a new instance of EntityUpdateInfo<TEntity> for delete.
public static EntityUpdateInfo<TEntity> CreateDelete(RtEntityId rtEntityId)
Parameters
rtEntityId RtEntityId
Runtime entity identifier for runtime id and construction kit type
Returns
CreateUpdate(RtEntityId, TEntity)
Creates a new instance of EntityUpdateInfo<TEntity> for update.
public static EntityUpdateInfo<TEntity> CreateUpdate(RtEntityId rtEntityId, TEntity rtEntity)
Parameters
rtEntityId RtEntityId
Runtime entity identifier for runtime id and construction kit type
rtEntity TEntity
Runtime entity to update
Returns
CreateConditionalUpdate(RtEntityId, TEntity, AttributeNewerThanGuard)
Creates a new instance of EntityUpdateInfo<TEntity> for a conditional update guarded by . The write is applied only if the persisted value at AttributeNewerThanGuard.AttributePath is missing, null, or less than or equal to AttributeNewerThanGuard.NewValue. Otherwise the write is silently skipped — the caller can detect this via the matched-count returned from the repository.
public static EntityUpdateInfo<TEntity> CreateConditionalUpdate(RtEntityId rtEntityId, TEntity rtEntity, AttributeNewerThanGuard updateGuard)
Parameters
rtEntityId RtEntityId
Runtime entity identifier for runtime id and construction kit type
rtEntity TEntity
Runtime entity to update
updateGuard AttributeNewerThanGuard
Guard that gates the write — see AttributeNewerThanGuard
Returns
CreateReplace(RtEntityId, TEntity)
Creates a new instance of EntityUpdateInfo<TEntity> for replace.
public static EntityUpdateInfo<TEntity> CreateReplace(RtEntityId rtEntityId, TEntity rtEntity)
Parameters
rtEntityId RtEntityId
Runtime entity identifier for runtime id and construction kit type
rtEntity TEntity
Runtime entity to replace