Language

ITeamsTurnContext.SendTargetedActivitiesAsync Method

Definition

Sends a set of activities to targeted recipients within the current turn context asynchronously.

public System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse[]> SendTargetedActivitiesAsync(Microsoft.Agents.Core.Models.IActivity[] activities, System.Threading.CancellationToken cancellationToken = default);
abstract member SendTargetedActivitiesAsync : Microsoft.Agents.Core.Models.IActivity[] * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse[]>
Public Function SendTargetedActivitiesAsync (activities As IActivity(), Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse())

Parameters

activities
IActivity[]

An array of activities to send. Each activity will be treated as targeted. Cannot be null and must not contain null elements.

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the send operation.

Returns

A task that represents the asynchronous send operation. The task result contains an array of ResourceResponse objects for each sent activity.

Applies to