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

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 staged publications plus optional local output through the shared choreography contracts.

public interface ISagaEventReactor<TEvent> : IAppBehavior<TEvent, SagaChoreographyStepResult>

TEvent

The input event type handled by the reactor.

IAppBehavior<TEvent, SagaChoreographyStepResult>

ReactAsync(TEvent, IBehaviorContext, CancellationToken)

Section titled “ ReactAsync(TEvent, IBehaviorContext, CancellationToken)”

Reacts to one event and returns the choreography publications plus optional local output.

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

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