CQRS.NET  2.2
A lightweight enterprise framework to write CQRS, event-sourced and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ TryMakeSnapshot()

virtual void Cqrs.Snapshots.SnapshotRepository< TAuthenticationToken >.TryMakeSnapshot ( IAggregateRoot< TAuthenticationToken >  aggregate,
IEnumerable< IEvent< TAuthenticationToken >>  uncommittedChanges 
)
protectedvirtual

Calls ISnapshotStrategy<TAuthenticationToken>.ShouldMakeSnapShot on SnapshotStrategy If the IAggregateRoot<TAuthenticationToken> is snapshot-able SnapshotAggregateRoot<TAuthenticationToken,TSnapshot>.GetSnapshot is called The Snapshot.Version is calculated, finally ISnapshotStore.Save is called on SnapshotStore.

Parameters
aggregateThe IAggregateRoot<TAuthenticationToken> to try and snapshot.
uncommittedChangesA collection of uncommited changes to assess. If null the aggregate will be asked to provide them.