Freigeben über


ActivityHandler.OnSearchInvokeAsync Methode

Definition

Wird aufgerufen, wenn dem Bot eine "invoke"-Aktivität mit dem Namen "application/search" gesendet wird.

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)

Parameter

turnContext
ITurnContext<IInvokeActivity>

Ein stark typisiertes Kontextobjekt für diesen Turn.

invokeValue
SearchInvokeValue

Ein stark typisiertes Objekt aus dem Wert der eingehenden Aktivität.

cancellationToken
CancellationToken

Ein Abbruchtoken, das von anderen Objekten oder Threads verwendet werden kann, um Nachricht vom Abbruch zu empfangen.

Gibt zurück

Eine Aufgabe, die die auszuführende Arbeit in der Warteschlange darstellt.

Hinweise

Wenn die OnInvokeActivityAsync(ITurnContext<IInvokeActivity>, CancellationToken) Methode einen Invoke-Wert mit dem Name Wert "application/search" empfängt, ruft sie diese Methode auf. Activity.Value muss ein wohlgeformt SearchInvokeValuesein.

Gilt für:

Weitere Informationen