Interface ISnapshotStrategy
- Namespace
- Excalibur.EventSourcing
- Assembly
- Excalibur.EventSourcing.Abstractions.dll
Defines the strategy for creating snapshots of aggregates.
public interface ISnapshotStrategy
Methods
ShouldCreateSnapshot(IAggregateRoot)
Determines whether a snapshot should be created for the aggregate.
[RequiresUnreferencedCode("Snapshot strategy evaluation may require types that cannot be statically analyzed. Consider using source generation.")]
[RequiresDynamicCode("Snapshot strategy evaluation may require dynamic code generation which is not compatible with AOT compilation.")]
bool ShouldCreateSnapshot(IAggregateRoot aggregate)
Parameters
aggregateIAggregateRootThe aggregate to check.
Returns
- bool
True if a snapshot should be created, otherwise false.