Taal

ActivityHandler.OnSearchInvokeAsync Methode

Definitie

Wordt aangeroepen wanneer de bot een 'invoke'-activiteit ontvangt met de naam 'application/search'.

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

Parameters

turnContext
ITurnContext<IInvokeActivity>

Een sterk getypeerd contextobject voor deze beurt.

invokeValue
SearchInvokeValue

Een sterk getypeerd object uit de Waarde van de binnenkomende activiteit.

cancellationToken
CancellationToken

Een annuleringstoken dat kan worden gebruikt door andere objecten of threads om kennisgeving van annulering te ontvangen.

Retouren

Een taak die het werk vertegenwoordigt dat in de wachtrij staat om uit te voeren.

Opmerkingen

Wanneer de OnInvokeActivityAsync(ITurnContext<IInvokeActivity>, CancellationToken) methode een Invoke ontvangt met een Name van 'application/search', roept deze methode aan. De activiteit.waarde moet goed gevormd SearchInvokeValuezijn.

Van toepassing op

Zie ook