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
TThe model type.
- Inheritance
-
DecisionRead<T>
- Implements
- Inherited Members
- Extension Methods
Properties
EventSequenceId
Gets the target sequence.
public EventSequenceId EventSequenceId { get; }
Property Value
EventStore
Gets the target event store.
public EventStoreName EventStore { get; }
Property Value
EventStreamId
Gets the event stream identifier, or null for a source-wide read.
public EventStreamId? EventStreamId { get; }
Property Value
EventStreamType
Gets the event stream type, or null for a source-wide read.
public EventStreamType? EventStreamType { get; }
Property Value
Exists
Gets whether an instance existed.
public bool Exists { get; }
Property Value
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
Key
Gets the key.
public ReadModelKey Key { get; }
Property Value
Namespace
Gets the target namespace.
public EventStoreNamespaceName Namespace { get; }
Property Value
ReadModelType
Gets the read model type.
public Type ReadModelType { get; }
Property Value
Methods
Unprotected(ReadModelKey, T?)
Wraps a legacy, unguarded read. It cannot be enrolled.
public static DecisionRead<T> Unprotected(ReadModelKey key, T? instance)
Parameters
keyReadModelKeyThe model key.
instanceTThe instance, if any.
Returns
- DecisionRead<T>
An unprotected read.