Interface IAsyncBehaviorRule<TContext, TValue>
Contract for defining an asynchronous behavior rule.
Inherited Members
Namespace: Kephas.Behaviors
Assembly: Kephas.Core.dll
Syntax
public interface IAsyncBehaviorRule<in TContext, TValue> : IAsyncBehaviorRule<TContext>, IBehaviorRuleFlowControl
Type Parameters
Name | Description |
---|---|
TContext | The context type. |
TValue | The type of the behavior value. |
Methods
| Improve this Doc View SourceGetValueAsync(TContext, CancellationToken)
Gets the behavior value asynchronously.
Declaration
Task<IBehaviorValue<TValue>> GetValueAsync(TContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
TContext | context | The context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IBehaviorValue<TValue>> | A promise of the behavior value. |