Language

NextTurn Delegate

Definition

Represents a delegate that invokes the next middleware component in the pipeline asynchronously.

public delegate System.Threading.Tasks.Task NextTurn(CancellationToken cancellationToken);
type NextTurn = delegate of CancellationToken -> Task
Public Delegate Function NextTurn(cancellationToken As CancellationToken) As Task 

Parameters

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Return Value

A task that represents the completion of the middleware invocation.

Remarks

This delegate is typically used in middleware scenarios to advance the request processing pipeline. The cancellation token should be observed to support cooperative cancellation.

Applies to