Condividi tramite


Conversations.SendToConversationWithHttpMessagesAsync Metodo

Definizione

Overload

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

SendToConversation.

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>>
override this.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))

Parametri

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

Restituisce

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implementazioni

Si applica 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>>
override this.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))

Parametri

conversationId
String

ID conversazione.

activity
Activity

Attività da inviare.

customHeaders
Dictionary<String,List<String>>

Intestazioni che verranno aggiunte alla richiesta.

cancellationToken
CancellationToken

Token di annullamento.

Restituisce

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Oggetto di risposta contenente il corpo della risposta e le intestazioni di risposta.

Implementazioni

Eccezioni

Generato quando l'operazione ha restituito un codice di stato non valido.

Microsoft.Rest.SerializationException

Generato quando non è possibile deserializzare la risposta.

Microsoft.Rest.ValidationException

Generato quando un valore di input non corrisponde al tipo di dati previsto, all'intervallo o al modello.

Generato quando un parametro obbligatorio è Null.

Commenti

Questo metodo consente di inviare un'attività alla fine di una conversazione.

Questo è leggermente diverso da ReplyToActivity(). * SendToConversation(conversationId) - aggiungerà l'attività alla fine della conversazione in base al timestamp o alla semantica del canale. * ReplyToActivity(conversationId,ActivityId) - aggiunge l'attività come risposta a un'altra attività, se il canale lo supporta. Se il canale non supporta le risposte annidate, ReplyToActivity torna a SendToConversation.

Usare ReplyToActivity quando si risponde a un'attività specifica nella conversazione.

Usare SendToConversation in tutti gli altri casi.

Si applica a