Jaa


UpdateActivityHandler Delegate

Definition

A method that can participate in update activity events for the current turn.

public delegate System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> UpdateActivityHandler(ITurnContext turnContext, Activity activity, Func<Task<ResourceResponse>> next);
type UpdateActivityHandler = delegate of ITurnContext * Activity * Func<Task<ResourceResponse>> -> Task<ResourceResponse>
Public Delegate Function UpdateActivityHandler(turnContext As ITurnContext, activity As Activity, next As Func(Of Task(Of ResourceResponse))) As Task(Of ResourceResponse) 

Parameters

turnContext
ITurnContext

The context object for the turn.

activity
Activity

The replacement activity.

next
Func<Task<ResourceResponse>>

The delegate to call to continue event processing.

Return Value

A task that represents the work queued to execute.

Remarks

A handler calls the next delegate to pass control to the next registered handler. If a handler doesn’t call the next delegate, the adapter does not call any of the subsequent handlers and does not update the activity.

The activity's Id indicates the activity in the conversation to replace.

If the activity is successfully sent, the next delegate returns a ResourceResponse object containing the ID that the receiving channel assigned to the activity. Use this response object as the return value of this handler.

Applies to

See also