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
ITurnContextA strongly-typed context object for this turn.
turnState
ITurnStateThe turn state object that stores arbitrary data for this turn.
data
objectThe data associated with the action.
cancellationToken
CancellationTokenA 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
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
ITurnContextturnState
ITurnStatedata
objectcancellationToken
CancellationTokencallback
AsyncCallbackobject
object
Returns
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
ITurnContextturnState
ITurnStatedata
objectcancellationToken
CancellationToken
Returns
- Task<AdaptiveCardInvokeResponse>