Class SnapshotStrategy
Implements the default snapshot strategy. A snapshot of an aggregate is taken after every Interval events.
public class SnapshotStrategy : ISnapshotStrategy
- Inheritance
-
SnapshotStrategy
- Implements
- Inherited Members
- Extension Methods
Constructors
SnapshotStrategy(int)
Constructs a new strategy.
public SnapshotStrategy(int interval)
Parameters
intervalint
Methods
ShouldTakeSnapShot(AggregateRoot, int)
Returns true if a snapshot should be taken for the aggregate.
public bool ShouldTakeSnapShot(AggregateRoot aggregate, int snapshotCount)
Parameters
aggregateAggregateRootsnapshotCountint