Interface IAppBehavior
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Abstractions.Behaviors
Assembly: Cephalon.Abstractions.dll
Single interface for all behavior patterns. Developers implement this once; pattern and transport are config-driven.
public interface IAppBehavior<TIn, TOut>Type Parameters
Section titled “Type Parameters”TIn
TOut
Methods
Section titled “Methods”ConfigureTopology(IBehaviorTopologyBuilder)
Section titled “ ConfigureTopology(IBehaviorTopologyBuilder)”Optional author-intent topology declaration. Called by source generator at build time. Override to declare pattern/transport defaults in code.
public static void ConfigureTopology(IBehaviorTopologyBuilder builder)Parameters
Section titled “Parameters”builder IBehaviorTopologyBuilder
HandleAsync(TIn, IBehaviorContext, CancellationToken)
Section titled “ HandleAsync(TIn, IBehaviorContext, CancellationToken)”Handles the behavior input and returns the output.
Task<TOut> HandleAsync(TIn input, IBehaviorContext context, CancellationToken ct = default)Parameters
Section titled “Parameters”input TIn
context IBehaviorContext
Returns
Section titled “Returns”Task<TOut>