ITeamsTurnContext.SendTargetedActivityAsync Method
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.
Sends an activity to the conversation with a targeted treatment, allowing the activity to be directed to a specific recipient or group within the conversation.
public System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse> SendTargetedActivityAsync(Microsoft.Agents.Core.Models.IActivity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member SendTargetedActivityAsync : Microsoft.Agents.Core.Models.IActivity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Agents.Core.Models.ResourceResponse>
Public Function SendTargetedActivityAsync (activity As IActivity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)
Parameters
- activity
- IActivity
The activity to send. Must represent the message or event to be delivered and cannot be null.
- 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 a ResourceResponse with information about the sent activity.