Compartilhar via


ConversationsExtensions.SendToConversationAsync Método

Definição

Sobrecargas

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

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

Enviar uma atividade para uma conversa.

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)

Parâmetros

operations
IConversations

O grupo de operações para esse método de extensão.

conversationId
String

ID da conversa.

activity
Activity

Atividade a ser enviada.

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

O ResourceResponse.

Comentários

Esse método permite que você envie uma atividade para o final de uma conversa.

Isso é um pouco diferente de ReplyToActivity(). * SendToConversation(conversationId) – acrescentará a atividade ao final da conversa de acordo com o carimbo de data/hora ou semântica do canal. * ReplyToActivity(conversationId,ActivityId) – adiciona a atividade como uma resposta a outra atividade, se o canal der suporte a ela. Se o canal não der suporte a respostas aninhadas, ReplyToActivity retornará para SendToConversation.

Use ReplyToActivity ao responder a uma atividade específica na conversa.

Use SendToConversation em todos os outros casos.

Aplica-se a

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)

Parâmetros

operations
IConversations
conversationId
String
activity
Activity
cancellationToken
CancellationToken

Retornos

Aplica-se a

SendToConversationAsync(IConversations, Activity, CancellationToken)

Enviar uma atividade para uma conversa.

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)

Parâmetros

operations
IConversations

O grupo de operações para esse método de extensão.

activity
Activity

Atividade a ser enviada.

cancellationToken
CancellationToken

O token de cancelamento.

Retornos

Um Task representando a operação assíncrona.

Aplica-se a

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)

Parâmetros

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Retornos

Aplica-se a