Table of Contents

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

AggregateId string

The aggregate identifier.

AggregateType string

The aggregate type name.

CurrentVersion long

The aggregate version after the save.

LastSnapshotVersion long?

The version of the last snapshot, or null if never snapshotted.

LastSnapshotTimestamp DateTimeOffset?

The timestamp of the last snapshot, or null if never snapshotted.

EventsSinceSnapshot int

The number of events committed since the last snapshot.

Properties

AggregateId

The aggregate identifier.

public string AggregateId { get; init; }

Property Value

string

AggregateType

The aggregate type name.

public string AggregateType { get; init; }

Property Value

string

CurrentVersion

The aggregate version after the save.

public long CurrentVersion { get; init; }

Property Value

long

EventsSinceSnapshot

The number of events committed since the last snapshot.

public int EventsSinceSnapshot { get; init; }

Property Value

int

LastSnapshotTimestamp

The timestamp of the last snapshot, or null if never snapshotted.

public DateTimeOffset? LastSnapshotTimestamp { get; init; }

Property Value

DateTimeOffset?

LastSnapshotVersion

The version of the last snapshot, or null if never snapshotted.

public long? LastSnapshotVersion { get; init; }

Property Value

long?