Share via


ActivityHandler.OnAdaptiveCardInvokeAsync Method

Definition

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

protected virtual System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.AdaptiveCardInvokeResponse> OnAdaptiveCardInvokeAsync(Microsoft.Agents.Builder.ITurnContext<Microsoft.Agents.Core.Models.IInvokeActivity> turnContext, Microsoft.Agents.Core.Models.AdaptiveCardInvokeValue invokeValue, System.Threading.CancellationToken cancellationToken);
abstract member OnAdaptiveCardInvokeAsync : Microsoft.Agents.Builder.ITurnContext<Microsoft.Agents.Core.Models.IInvokeActivity> * Microsoft.Agents.Core.Models.AdaptiveCardInvokeValue * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.AdaptiveCardInvokeResponse>
override this.OnAdaptiveCardInvokeAsync : Microsoft.Agents.Builder.ITurnContext<Microsoft.Agents.Core.Models.IInvokeActivity> * Microsoft.Agents.Core.Models.AdaptiveCardInvokeValue * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.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 of `adaptiveCard/action`, it calls this method.

Applies to

See also