SendActivitiesHandler Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A method that can participate in send activity events for the current turn.
public delegate System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse[]> SendActivitiesHandler(ITurnContext turnContext, List<Activity> activities, Func<Task<ResourceResponse[]>> next);
type SendActivitiesHandler = delegate of ITurnContext * List<Activity> * Func<Task<ResourceResponse[]>> -> Task<ResourceResponse[]>
Public Delegate Function SendActivitiesHandler(turnContext As ITurnContext, activities As List(Of Activity), next As Func(Of Task(Of ResourceResponse()))) As Task(Of ResourceResponse())
Parameters
- turnContext
- ITurnContext
The context object for the turn.
- 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 send the activities
.
If the activities are successfully sent, the next
delegate returns an array of ResourceResponse objects containing the IDs that the receiving channel assigned to the activities. Use this array as the return value of this handler.