Lenguaje

IConversations.SendToConversationWithHttpMessagesAsync Método

Definición

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

Devoluciones

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Se aplica 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 de la conversación.

activity
Activity

Actividad que se va a enviar.

customHeaders
Dictionary<String,List<String>>

Las cabeceras que se añadirán a la solicitud.

cancellationToken
CancellationToken

Token de cancelación.

Devoluciones

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Una tarea que representa el Microsoft.Rest.HttpOperationResponse.

Excepciones

Se desactivó cuando la operación devolvió un código de estado inválido.

Microsoft.Rest.SerializationException

Lo lanzamos cuando no se puede desserializar la respuesta.

Microsoft.Rest.ValidationException

Se lanza cuando un parámetro requerido es nulo.

Comentarios

Este método permite enviar una actividad al final de una conversación.

Esto es ligeramente diferente de ReplyToActivity(). * SendToConversation(conversationId): anexará la actividad al final de la conversación según la marca de tiempo o la semántica del canal. * ReplyToActivity(conversationId,ActivityId): agrega la actividad como respuesta a otra actividad, si el canal lo admite. Si el canal no admite respuestas anidadas, ReplyToActivity vuelve a SendToConversation.

Use ReplyToActivity al responder a una actividad específica de la conversación.

Use SendToConversation en todos los demás casos.

Se aplica a