Language

SearchHandler Delegate

Definition

Delegate for handling 'application/search' invoke activities, sent by Adaptive Card dynamic typeahead 'Input.ChoiceSet' inputs.

public delegate System.Threading.Tasks.Task<Microsoft.Teams.Apps.InvokeResponse<Microsoft.Teams.Apps.Handlers.SearchResponse>> SearchHandler(Context<InvokeActivity<SearchValue>> context, CancellationToken cancellationToken = default);
type SearchHandler = delegate of Context<InvokeActivity<SearchValue>> * CancellationToken -> Task<InvokeResponse<SearchResponse>>
Public Delegate Function SearchHandler(context As Context(Of InvokeActivity(Of SearchValue)), Optional cancellationToken As CancellationToken = Nothing) As Task(Of InvokeResponse(Of SearchResponse)) 

Parameters

context
Context<InvokeActivity<SearchValue>>

The context for the invoke activity, providing access to the activity data and bot application.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the operation.

Return Value

A task that represents the asynchronous operation. The task result contains the search invoke response.

Applies to