UpdateActivityHandler Delegate

Definition

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

C#
public delegate System.Threading.Tasks.Task<Microsoft.Agents.Protocols.Primitives.ResourceResponse> UpdateActivityHandler(ITurnContext turnContext, IActivity activity, Func<Task<ResourceResponse>> next);

Parameters

turnContext
ITurnContext

The context object for the turn.

activity
IActivity

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

Product Versions
Microsoft 365 Agents SDK .NET 1

See also