QueryHandlerAsync<TState> Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Function for handling Message Extension query events.
public delegate System.Threading.Tasks.Task<Microsoft.Bot.Schema.Teams.MessagingExtensionResult> QueryHandlerAsync<TState>(ITurnContext turnContext, TState turnState, Query<Dictionary<string,object>> query, CancellationToken cancellationToken) where TState : TurnState;
type QueryHandlerAsync<'State (requires 'State :> TurnState)> = delegate of ITurnContext * 'State * Query<Dictionary<string, obj>> * CancellationToken -> Task<MessagingExtensionResult>
Public Delegate Function QueryHandlerAsync(Of TState)(turnContext As ITurnContext, turnState As TState, query As Query(Of Dictionary(Of String, Object)), cancellationToken As CancellationToken) As Task(Of MessagingExtensionResult)
Type Parameters
- TState
Type of the turn state. This allows for strongly typed access to the turn state.
Parameters
- turnContext
- ITurnContext
A strongly-typed context object for this turn.
- turnState
- TState
The turn state object that stores arbitrary data for this turn.
- query
- Query<Dictionary<String,Object>>
The query parameters that were sent by the client.
- cancellationToken
- CancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation.
Return Value
An instance of MessagingExtensionResult.