Class DecisionRead<T>

Namespace
Cratis.Chronicle.ReadModels
Assembly
Cratis.Chronicle.dll

A present or absent read model together with its decision guard.

public sealed class DecisionRead<T> : IDecisionRead where T : class

Type Parameters

T

The model type.

Inheritance
DecisionRead<T>
Implements
Inherited Members
Extension Methods

Properties

EventSequenceId

Gets the target sequence.

public EventSequenceId EventSequenceId { get; }

Property Value

EventSequenceId

EventStore

Gets the target event store.

public EventStoreName EventStore { get; }

Property Value

EventStoreName

EventStreamId

Gets the event stream identifier, or null for a source-wide read.

public EventStreamId? EventStreamId { get; }

Property Value

EventStreamId

EventStreamType

Gets the event stream type, or null for a source-wide read.

public EventStreamType? EventStreamType { get; }

Property Value

EventStreamType

Exists

Gets whether an instance existed.

public bool Exists { get; }

Property Value

bool

Instance

Gets the instance, or null when absent.

public T? Instance { get; }

Property Value

T

IsProtected

Gets whether the read carries a guard.

public bool IsProtected { get; }

Property Value

bool

Key

Gets the key.

public ReadModelKey Key { get; }

Property Value

ReadModelKey

Namespace

Gets the target namespace.

public EventStoreNamespaceName Namespace { get; }

Property Value

EventStoreNamespaceName

ReadModelType

Gets the read model type.

public Type ReadModelType { get; }

Property Value

Type

Methods

Unprotected(ReadModelKey, T?)

Wraps a legacy, unguarded read. It cannot be enrolled.

public static DecisionRead<T> Unprotected(ReadModelKey key, T? instance)

Parameters

key ReadModelKey

The model key.

instance T

The instance, if any.

Returns

DecisionRead<T>

An unprotected read.