Share via


TurnContext.OnSendActivities(SendActivitiesHandler) Method

Definition

Adds a response handler for send activity operations.

public Microsoft.Bot.Builder.ITurnContext OnSendActivities (Microsoft.Bot.Builder.SendActivitiesHandler handler);
abstract member OnSendActivities : Microsoft.Bot.Builder.SendActivitiesHandler -> Microsoft.Bot.Builder.ITurnContext
override this.OnSendActivities : Microsoft.Bot.Builder.SendActivitiesHandler -> Microsoft.Bot.Builder.ITurnContext
Public Function OnSendActivities (handler As SendActivitiesHandler) As ITurnContext

Parameters

handler
SendActivitiesHandler

The handler to add to the context object.

Returns

The updated context object.

Implements

Exceptions

handler is null.

Remarks

When the context's SendActivityAsync(IActivity, CancellationToken) or SendActivitiesAsync(IActivity[], CancellationToken) methods are called, the adapter calls the registered handlers in the order in which they were added to the context object.

Applies to