Class SnapshotDecisionContext
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
Provides context for snapshot decision evaluation in CustomPolicy.
public sealed record SnapshotDecisionContext : IEquatable<SnapshotDecisionContext>
- Inheritance
-
SnapshotDecisionContext
- Implements
- Inherited Members
Constructors
SnapshotDecisionContext(string, string, long, long?, DateTimeOffset?, int)
Provides context for snapshot decision evaluation in CustomPolicy.
public SnapshotDecisionContext(string AggregateId, string AggregateType, long CurrentVersion, long? LastSnapshotVersion, DateTimeOffset? LastSnapshotTimestamp, int EventsSinceSnapshot)
Parameters
AggregateIdstringThe aggregate identifier.
AggregateTypestringThe aggregate type name.
CurrentVersionlongThe aggregate version after the save.
LastSnapshotVersionlong?The version of the last snapshot, or null if never snapshotted.
LastSnapshotTimestampDateTimeOffset?The timestamp of the last snapshot, or null if never snapshotted.
EventsSinceSnapshotintThe number of events committed since the last snapshot.
Properties
AggregateId
The aggregate identifier.
public string AggregateId { get; init; }
Property Value
AggregateType
The aggregate type name.
public string AggregateType { get; init; }
Property Value
CurrentVersion
The aggregate version after the save.
public long CurrentVersion { get; init; }
Property Value
EventsSinceSnapshot
The number of events committed since the last snapshot.
public int EventsSinceSnapshot { get; init; }
Property Value
LastSnapshotTimestamp
The timestamp of the last snapshot, or null if never snapshotted.
public DateTimeOffset? LastSnapshotTimestamp { get; init; }
Property Value
LastSnapshotVersion
The version of the last snapshot, or null if never snapshotted.
public long? LastSnapshotVersion { get; init; }
Property Value
- long?