InvokeAsync(InvocationContext, Func<InvocationContext, Task>) Method

Definition

Assembly CliInvoke.Core.dll

Invokes the middleware, optionally calling next to continue the pipeline.

Task InvokeAsync(InvocationContext context, Func<InvocationContext, Task> next)

Parameters

context
InvocationContext

The current invocation context.

next
Func<InvocationContext, Task>

The delegate to invoke the next middleware or the terminal pipeline.

Returns

Task
A task representing the asynchronous operation.

Remarks

The next delegate no longer carries a CancellationToken parameter. Middleware must read the cancellation token from context.CancellationToken.