ข้ามไปยังเนื้อหา

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>>

TEvent

The input event type handled by the reactor.

TOutput

The local output type returned by the reactor.

IAppBehavior<TEvent, SagaChoreographyStepResult<TOutput>>

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)

input TEvent

The input event for this choreography step.

context IBehaviorContext

The ambient behavior context.

ct CancellationToken

A token that cancels the reaction.

Task<SagaChoreographyStepResult<TOutput>>

The typed local output and publications produced by the choreography step.