Jaa


ActivityHandler.OnAdaptiveCardInvokeAsync Method

Definition

Invoked when the bot is sent an Adaptive Card Action Execute.

protected virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.AdaptiveCardInvokeResponse> OnAdaptiveCardInvokeAsync (Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> turnContext, Microsoft.Bot.Schema.AdaptiveCardInvokeValue invokeValue, System.Threading.CancellationToken cancellationToken);
abstract member OnAdaptiveCardInvokeAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.AdaptiveCardInvokeValue * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.AdaptiveCardInvokeResponse>
override this.OnAdaptiveCardInvokeAsync : Microsoft.Bot.Builder.ITurnContext<Microsoft.Bot.Schema.IInvokeActivity> * Microsoft.Bot.Schema.AdaptiveCardInvokeValue * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.AdaptiveCardInvokeResponse>
Protected Overridable Function OnAdaptiveCardInvokeAsync (turnContext As ITurnContext(Of IInvokeActivity), invokeValue As AdaptiveCardInvokeValue, cancellationToken As CancellationToken) As Task(Of AdaptiveCardInvokeResponse)

Parameters

turnContext
ITurnContext<IInvokeActivity>

A strongly-typed context object for this turn.

invokeValue
AdaptiveCardInvokeValue

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 `adaptiveCard/action`, it calls this method.

Applies to

See also