Språk

ActivityHandler.OnTokenResponseEventAsync Metod

Definition

Anropas när en tokens/response händelse tas emot när basbeteendet av OnEventActivityAsync(ITurnContext<IEventActivity>, CancellationToken) används. Om du använder en OAuthPrompt, åsidosätt denna metod för att vidarebefordra detta Activity till den aktuella dialogen. Som standard gör den här metoden ingenting.

protected virtual System.Threading.Tasks.Task OnTokenResponseEventAsync(Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> turnContext, System.Threading.CancellationToken cancellationToken);
abstract member OnTokenResponseEventAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.OnTokenResponseEventAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IEventActivity> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function OnTokenResponseEventAsync (turnContext As ITurnContext(Of IEventActivity), cancellationToken As CancellationToken) As Task

Parametrar

turnContext
ITurnContext<IEventActivity>

Ett starkt typat kontextobjekt för denna tur.

cancellationToken
CancellationToken

En annulleringstoken som kan användas av andra objekt eller trådar för att få meddelande om annullering.

Returer

En uppgift som representerar det arbete som ska köras i kö.

Kommentarer

När OnEventActivityAsync(ITurnContext<IEventActivity>, CancellationToken) metoden tar emot en händelse med en Name av 'tokens/response' anropar den denna metod.

Om din bot använder OAuthPrompt, vidarebefordra den inkommande Activity till den aktuella dialogen.

Gäller för

Se även