Skip to main content

EntityUpdateInfo<TEntity>

Namespace: Meshmakers.Octo.Runtime.Contracts

Represents an entity update info.

public class EntityUpdateInfo<TEntity> : IEntityUpdateInfo<TEntity>

Type Parameters

TEntity

Inheritance ObjectEntityUpdateInfo<TEntity>
Implements IEntityUpdateInfo<TEntity>

Properties

RtEntity

public TEntity RtEntity { get; }

Property Value

TEntity

RtId

public Nullable<OctoObjectId> RtId { get; }

Property Value

Nullable<OctoObjectId>

CkTypeId

public RtCkId<CkTypeId> CkTypeId { get; }

Property Value

RtCkId<CkTypeId>

ModOption

MOD option.

public EntityModOptions ModOption { get; }

Property Value

EntityModOptions

UpdateGuard

public AttributeNewerThanGuard UpdateGuard { get; }

Property Value

AttributeNewerThanGuard

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

EntityUpdateInfo<TEntity>

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

EntityUpdateInfo<TEntity>

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

EntityUpdateInfo<TEntity>

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

EntityUpdateInfo<TEntity>

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

EntityUpdateInfo<TEntity>

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

Returns

EntityUpdateInfo<TEntity>