Share via


StreamingRequestHandler.SendActivityAsync(Activity, CancellationToken) Method

Definition

Converts an Activity into a StreamingRequest and sends it to the channel this StreamingRequestHandler is connected to.

public virtual System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendActivityAsync (Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
abstract member SendActivityAsync : Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
override this.SendActivityAsync : Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
Public Overridable Function SendActivityAsync (activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

activity
Activity

The activity to send.

cancellationToken
CancellationToken

A cancellation token.

Returns

A task that resolves to a ResourceResponse.

Applies to