Interface IAkkaSagaRepository<TAuthenticationToken>
A SagaRepository<TAuthenticationToken> that is safe to use within Akka.NET
Inherited Members
Namespace: Cqrs.Akka.Domain
Assembly: Cqrs.Akka.dll
Syntax
public interface IAkkaSagaRepository<TAuthenticationToken> : ISagaRepository<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The System.Type of authentication token. |
Methods
LoadSagaHistory<TSaga>(TSaga, IList<ISagaEvent<TAuthenticationToken>>, Boolean)
If events
is null, loads the events from an IEventStore<TAuthenticationToken>, checks for duplicates and then
rehydrates the saga
with the events.
Declaration
void LoadSagaHistory<TSaga>(TSaga saga, IList<ISagaEvent<TAuthenticationToken>> events = null, bool throwExceptionOnNoEvents = true)where TSaga : ISaga<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
TSaga | saga | The |
System.Collections.Generic.IList<ISagaEvent<TAuthenticationToken>> | events | A collection of IEvent<TAuthenticationToken> to replay on the retrieved ISaga<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 SagaNotFoundException<TSaga, TAuthenticationToken> if no aggregate events or provided or found in the IEventStore<TAuthenticationToken>. |
Type Parameters
Name | Description |
---|---|
TSaga | The System.Type of ISaga<TAuthenticationToken>. |