Table of Contents

Delegate ActionExecuteHandler

Namespace
Microsoft.Agents.Builder.App.AdaptiveCards
Assembly
Microsoft.Agents.Builder.dll

Function for handling Adaptive Card Action.Execute events.

public delegate Task<AdaptiveCardInvokeResponse> ActionExecuteHandler(ITurnContext turnContext, ITurnState turnState, object data, CancellationToken cancellationToken)

Parameters

turnContext ITurnContext

A strongly-typed context object for this turn.

turnState ITurnState

The turn state object that stores arbitrary data for this turn.

data object

The data associated with the action.

cancellationToken CancellationToken

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

Returns

Task<AdaptiveCardInvokeResponse>

An instance of AdaptiveCardInvokeResponse, which can be created using AdaptiveCardInvokeResponseFactory.

Constructors

ActionExecuteHandler(object, nint)

public ActionExecuteHandler(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(ITurnContext, ITurnState, object, CancellationToken, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(ITurnContext turnContext, ITurnState turnState, object data, CancellationToken cancellationToken, AsyncCallback callback, object @object)

Parameters

turnContext ITurnContext
turnState ITurnState
data object
cancellationToken CancellationToken
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual Task<AdaptiveCardInvokeResponse> EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Returns

Task<AdaptiveCardInvokeResponse>

Invoke(ITurnContext, ITurnState, object, CancellationToken)

public virtual Task<AdaptiveCardInvokeResponse> Invoke(ITurnContext turnContext, ITurnState turnState, object data, CancellationToken cancellationToken)

Parameters

turnContext ITurnContext
turnState ITurnState
data object
cancellationToken CancellationToken

Returns

Task<AdaptiveCardInvokeResponse>