Table of Contents

Class SnapshotStrategy

Namespace
Shift.Common.Timeline.Snapshots
Assembly
Shift.Common.dll

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

interval int

Methods

ShouldTakeSnapShot(AggregateRoot, int)

Returns true if a snapshot should be taken for the aggregate.

public bool ShouldTakeSnapShot(AggregateRoot aggregate, int snapshotCount)

Parameters

aggregate AggregateRoot
snapshotCount int

Returns

bool