Interface ISagaManager
- Namespace
- Stratara.Sagas.Abstractions
- Assembly
- Stratara.Sagas.dll
Fans an incoming event bundle out to every registered ISaga in parallel and runs the per-saga dispatch via ISagaHandler.
public interface ISagaManager
- Extension Methods
Methods
HandleAsync(IReadOnlyList<IEvent>, CancellationToken)
Dispatch the given events to every registered saga. Sagas that have no relevant handler are skipped.
Task HandleAsync(IReadOnlyList<IEvent> events, CancellationToken cancellationToken)
Parameters
eventsIReadOnlyList<IEvent>The bundle's events. The framework's worker hands the framework's manager only the events a registered saga declares a handler for, leaving the others unread; a manager registered in its place receives every event of the bundle.
cancellationTokenCancellationTokenCancellation token propagated to all saga invocations.