ConversationsExtensions.SendToConversationAsync Method

Definition

Overloads

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

SendToConversationAsync(IConversations, String, Activity, CancellationToken)
SendToConversationAsync(IConversations, Activity, CancellationToken)

Send an activity to a conversation.

SendToConversationAsync(IConversations, Activity, CancellationToken)

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations

The operations group for this extension method.

conversationId
String

Conversation ID.

activity
Activity

Activity to send.

cancellationToken
CancellationToken

The cancellation token.

Returns

The ResourceResponse.

Remarks

This method allows you to send an activity to the end of a conversation.

This is slightly different from ReplyToActivity(). * SendToConversation(conversationId) - will append the activity to the end of the conversation according to the timestamp or semantics of the channel. * ReplyToActivity(conversationId,ActivityId) - adds the activity as a reply to another activity, if the channel supports it. If the channel does not support nested replies, ReplyToActivity falls back to SendToConversation.

Use ReplyToActivity when replying to a specific activity in the conversation.

Use SendToConversation in all other cases.

Applies to

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations
conversationId
String
activity
Activity
cancellationToken
CancellationToken

Returns

Applies to

SendToConversationAsync(IConversations, Activity, CancellationToken)

Send an activity to a conversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations

The operations group for this extension method.

activity
Activity

Activity to send.

cancellationToken
CancellationToken

The cancellation token.

Returns

A Task representing the asynchronous operation.

Applies to

SendToConversationAsync(IConversations, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parameters

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Returns

Applies to