Class ReadModelSnapshot<TReadModel>
- Namespace
- Cratis.Chronicle.ReadModels
- Assembly
- Cratis.Chronicle.dll
Represents a snapshot of a read model at a specific point in time grouped by CorrelationId.
public record ReadModelSnapshot<TReadModel> : IEquatable<ReadModelSnapshot<TReadModel>>
Type Parameters
TReadModelType of read model.
- Inheritance
-
ReadModelSnapshot<TReadModel>
- Implements
-
IEquatable<ReadModelSnapshot<TReadModel>>
- Inherited Members
Constructors
ReadModelSnapshot(TReadModel, IEnumerable<AppendedEvent>, DateTimeOffset, CorrelationId)
Represents a snapshot of a read model at a specific point in time grouped by CorrelationId.
public ReadModelSnapshot(TReadModel Instance, IEnumerable<AppendedEvent> Events, DateTimeOffset Occurred, CorrelationId CorrelationId)
Parameters
InstanceTReadModelThe read model instance.
EventsIEnumerable<AppendedEvent>The deserialized events that were applied.
OccurredDateTimeOffsetWhen the first event occurred.
CorrelationIdCorrelationIdThe CorrelationId the events were for.
Properties
CorrelationId
The CorrelationId the events were for.
public CorrelationId CorrelationId { get; init; }
Property Value
Events
The deserialized events that were applied.
public IEnumerable<AppendedEvent> Events { get; init; }
Property Value
Instance
The read model instance.
public TReadModel Instance { get; init; }
Property Value
- TReadModel
Occurred
When the first event occurred.
public DateTimeOffset Occurred { get; init; }