Interface IAkkaAggregateRepository<TAuthenticationToken>
A AggregateRepository<TAuthenticationToken> that is safe to use within Akka.NET
Inherited Members
Namespace: Cqrs.Akka.Domain
Assembly: Cqrs.Akka.dll
Syntax
public interface IAkkaAggregateRepository<TAuthenticationToken> : IAggregateRepository<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of authentication token. |
Methods
LoadAggregateHistory<TAggregateRoot>(TAggregateRoot, IList<IEvent<TAuthenticationToken>>, Boolean)
If events
is null, loads the events from IEventStore<TAuthenticationToken>, checks for duplicates and then
rehydrates the aggregate
with the events.
Declaration
void LoadAggregateHistory<TAggregateRoot>(TAggregateRoot aggregate, IList<IEvent<TAuthenticationToken>> events = null, bool throwExceptionOnNoEvents = true)where TAggregateRoot : IAggregateRoot<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
TAggregateRoot | aggregate | The |
System.Collections.Generic.IList<IEvent<TAuthenticationToken>> | events | A 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. |
System.Boolean | throwExceptionOnNoEvents | If true will throw an instance of AggregateNotFoundException<TAggregateRoot, TAuthenticationToken> if no aggregate events or provided or found in the IEventStore<TAuthenticationToken>. |
Type Parameters
Name | Description |
---|---|
TAggregateRoot | The System.Type of IAggregateRoot<TAuthenticationToken>. |