Redigera

Dela via


InvocationMiddleware Delegate

Definition

A delegate used for adding command handler invocation middleware.

public delegate System::Threading::Tasks::Task ^ InvocationMiddleware(InvocationContext ^ context, Func<InvocationContext ^, Task ^> ^ next);
public delegate System.Threading.Tasks.Task InvocationMiddleware(InvocationContext context, Func<InvocationContext,Task> next);
type InvocationMiddleware = delegate of InvocationContext * Func<InvocationContext, Task> -> Task
Public Delegate Function InvocationMiddleware(context As InvocationContext, next As Func(Of InvocationContext, Task)) As Task 

Parameters

context
InvocationContext

The context for the current invocation, which will be passed to each middleware and then to the command handler, unless a middleware short circuits it.

next
Func<InvocationContext,Task>

A continuation. Passing the incoming InvocationContext to it will execute the next middleware in the pipeline and, at the end of the pipeline, the command handler. Middleware can short circuit the invocation by not calling this continuation.

Return Value

Applies to