Idioma

IConversations.SendToConversationWithHttpMessagesAsync Método

Definição

Sobrecargas

SendToConversationWithHttpMessagesAsync(String, Activity, Dictionary<String,List<String>>, CancellationToken)

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>> SendToConversationWithHttpMessagesAsync(string conversationId, Microsoft.Bot.Connector.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendToConversationWithHttpMessagesAsync : string * Microsoft.Bot.Connector.Activity * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>>
Public Function SendToConversationWithHttpMessagesAsync (conversationId As String, activity As Activity, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))

Parâmetros

conversationId
String
activity
Activity
customHeaders
Dictionary<String,List<String>>
cancellationToken
CancellationToken

Devoluções

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Aplica-se a

SendToConversationWithHttpMessagesAsync(String, Activity, Dictionary<String,List<String>>, CancellationToken)

SendToConversation.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>> SendToConversationWithHttpMessagesAsync(string conversationId, Microsoft.Bot.Schema.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendToConversationWithHttpMessagesAsync : string * Microsoft.Bot.Schema.Activity * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>>
Public Function SendToConversationWithHttpMessagesAsync (conversationId As String, activity As Activity, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ResourceResponse))

Parâmetros

conversationId
String

ID da Conversa.

activity
Activity

Atividade a enviar.

customHeaders
Dictionary<String,List<String>>

Os cabeçalhos que serão adicionados ao pedido.

cancellationToken
CancellationToken

O token de cancelamento.

Devoluções

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Uma tarefa que representa o Microsoft.Rest.HttpOperationResponse.

Exceções

Foi lançado quando a operação devolveu um código de estado inválido.

Microsoft.Rest.SerializationException

Lançado quando não é possível desserializar a resposta.

Microsoft.Rest.ValidationException

Lançado quando um parâmetro exigido é nulo.

Observações

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

Isso é ligeiramente diferente de ReplyToActivity(). * SendToConversation(conversationId) - irá acrescentar a atividade ao final da conversa de acordo com o carimbo temporal ou semântica do canal. * ReplyToActivity(conversationId,ActivityId) - adiciona a atividade como resposta a outra atividade, se o canal a suportar. Se o canal não oferecer 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