CQRS.NET  4.0
A lightweight enterprise Function as a Service (FaaS) framework to write function based serverless and micro-service applications in hybrid multi-datacentre, on-premise and Azure environments.

◆ LoadAggregateHistoryToDate< TAggregateRoot >()

virtual void Cqrs.Domain.AggregateRepository< TAuthenticationToken >.LoadAggregateHistoryToDate< TAggregateRoot > ( TAggregateRoot  aggregate,
DateTime  versionedDate,
IList< IEvent< TAuthenticationToken >>  events = null,
bool  throwExceptionOnNoEvents = true 
)
virtual

If events is null, loads the events from EventStore, checks for duplicates and then rehydrates the aggregate with the events.

Template Parameters
TAggregateRootThe Type of IAggregateRoot<TAuthenticationToken>.
Parameters
aggregateThe TAggregateRoot to rehydrate.
versionedDateLoad events up-to and including from this DateTime
eventsA collection of IEvent<TAuthenticationToken> to replay on the retrieved IAggregateRoot<TAuthenticationToken>. If null, the IEventStore<TAuthenticationToken> will be used to retrieve a list of IEvent<TAuthenticationToken> for you.
throwExceptionOnNoEventsIf true will throw an instance of AggregateNotFoundException<TAggregateRoot,TAuthenticationToken> if no aggregate events or provided or found in the EventStore.
Type Constraints
TAggregateRoot :IAggregateRoot<TAuthenticationToken>