Language

SelectItemHandler<TData> Delegate

Definition

Function for handling Message Extension selecting item events.

public delegate System.Threading.Tasks.Task<Microsoft.Teams.Api.MessageExtensions.Response> SelectItemHandler<TData>(ITeamsTurnContext turnContext, ITurnState turnState, TData data, CancellationToken cancellationToken);
type SelectItemHandler<'Data> = delegate of ITeamsTurnContext * ITurnState * 'Data * CancellationToken -> Task<Response>
Public Delegate Function SelectItemHandler(Of TData)(turnContext As ITeamsTurnContext, turnState As ITurnState, data As TData, cancellationToken As CancellationToken) As Task(Of Response) 

Type Parameters

TData

The type of Activity.Value associated with the select item action. Use type object or JsonElement if unsure.

Parameters

turnContext
ITeamsTurnContext

The context for the current conversation turn.

turnState
ITurnState

The state object that stores arbitrary data for this turn.

data
TData

The data associated with the select item action.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Return Value

Task<Microsoft.Teams.Api.MessageExtensions.Response>

An instance of MessageExtensions.Response.

Applies to