ActivityHandler.OnSearchInvokeAsync Method

Definition

Invoked when the bot is sent an 'invoke' activity having name of '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>

A strongly-typed context object for this turn.

invokeValue
SearchInvokeValue

A strongly-typed object from the incoming activity's Value.

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.

Remarks

When the OnInvokeActivityAsync(ITurnContext<IInvokeActivity>, CancellationToken) method receives an Invoke with a Name of `application/search`, it calls this method. The Activity.Value must be a well formed SearchInvokeValue.

Applies to

See also