Class BehaviorExecutionSlot
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Behaviors.Services
Assembly: Cephalon.Behaviors.dll
A compiled, type-safe invocation delegate for a concrete
public sealed class BehaviorExecutionSlotInheritance
Section titled “Inheritance”object ← BehaviorExecutionSlot
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”For<TBehavior, TIn, TOut>()
Section titled “ For<TBehavior, TIn, TOut>()”Creates a
public static BehaviorExecutionSlot For<TBehavior, TIn, TOut>() where TBehavior : IAppBehavior<TIn, TOut> where TIn : notnullReturns
Section titled “Returns”A compiled execution slot for the behavior.
Type Parameters
Section titled “Type Parameters”TBehavior
The concrete behavior type.
TIn
The input message type.
TOut
The output message type.
ForType(Type)
Section titled “ ForType(Type)”Creates a IAppBehavior<TIn, TOut> interface is located on behaviorType
and the generic
public static BehaviorExecutionSlot ForType(Type behaviorType)Parameters
Section titled “Parameters”behaviorType Type
The concrete behavior implementation type.
Returns
Section titled “Returns”A compiled execution slot for the behavior.
Exceptions
Section titled “Exceptions”Thrown when behaviorType does not implement IAppBehavior<TIn, TOut>.
InvokeAsync(object, object, IBehaviorContext, CancellationToken)
Section titled “ InvokeAsync(object, object, IBehaviorContext, CancellationToken)”Invokes the compiled behavior delegate.
public Task<object?> InvokeAsync(object behavior, object input, IBehaviorContext context, CancellationToken ct = default)Parameters
Section titled “Parameters”behavior object
The resolved behavior instance.
input object
The input message object.
context IBehaviorContext
The behavior execution context.
A token that cancels the invocation.
Returns
Section titled “Returns”A task that resolves to the behavior output, boxed as