Interface IAsyncCommandExecutionScope

Namespace
Cratis.Arc.Commands
Assembly
Cratis.Arc.Core.dll

Defines an execution scope with asynchronous initialization before command filters run.

public interface IAsyncCommandExecutionScope : ICommandExecutionScope
Inherited Members
Extension Methods

Remarks

Implementations are discovered as ICommandExecutionScope. All synchronous Begin(CommandContext) calls run first, establishing ambient state. Then asynchronous initialization runs sequentially in the same scope order, after context values are built and before filters. Use synchronous Begin for ambient state: changes to AsyncLocal values inside an asynchronous method do not flow back to its caller. Completion follows the ordinary execution-scope lifecycle, including initialization failure or cancellation. Validation-only calls do not begin or complete execution scopes.

Methods

BeginAsync(CommandContext)

Initializes the scope asynchronously, honoring CancellationToken.

Task BeginAsync(CommandContext context)

Parameters

context CommandContext

The command context, including its built values and cancellation token.

Returns

Task

The initialization task.