Interface ISagaEventReactor
Namespace: Cephalon.Behaviors.Patterns.Abstractions
Assembly: Cephalon.Behaviors.Patterns.dll
Provides a higher-level authoring helper for choreography-based saga steps that react to one event and return a typed local output alongside staged publications.
public interface ISagaEventReactor<TEvent, TOutput> : IAppBehavior<TEvent, SagaChoreographyStepResult<TOutput>>Type Parameters
Section titled “Type Parameters”TEvent
The input event type handled by the reactor.
TOutput
The local output type returned by the reactor.
Implements
Section titled “Implements”IAppBehavior<TEvent, SagaChoreographyStepResult<TOutput>>
Methods
Section titled “Methods”ReactAsync(TEvent, IBehaviorContext, CancellationToken)
Section titled “ ReactAsync(TEvent, IBehaviorContext, CancellationToken)”Reacts to one event and returns typed local output plus choreography publications.
Task<SagaChoreographyStepResult<TOutput>> ReactAsync(TEvent input, IBehaviorContext context, CancellationToken ct = default)Parameters
Section titled “Parameters”input TEvent
The input event for this choreography step.
context IBehaviorContext
The ambient behavior context.
A token that cancels the reaction.
Returns
Section titled “Returns”Task<SagaChoreographyStepResult<TOutput>>
The typed local output and publications produced by the choreography step.