Share via


RegisterClassMiddleware<T>.OnTurnAsync Method

Definition

Adds the associated object or service to the current turn context.

public System.Threading.Tasks.Task OnTurnAsync (Microsoft.Bot.Builder.ITurnContext turnContext, Microsoft.Bot.Builder.NextDelegate nextTurn, System.Threading.CancellationToken cancellationToken);
abstract member OnTurnAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.NextDelegate * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnTurnAsync : Microsoft.Bot.Builder.ITurnContext * Microsoft.Bot.Builder.NextDelegate * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function OnTurnAsync (turnContext As ITurnContext, nextTurn As NextDelegate, cancellationToken As CancellationToken) As Task

Parameters

turnContext
ITurnContext

The context object for this turn.

nextTurn
NextDelegate

The delegate to call to continue the bot middleware pipeline.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

A task that represents the work queued to execute.

Implements

Applies to

See also