IConversations.SendToConversationWithHttpMessagesAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
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))
Paramètres
- conversationId
- String
- activity
- Activity
- customHeaders
- Dictionary<String,List<String>>
- cancellationToken
- CancellationToken
Retours
S’applique à
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))
Paramètres
- conversationId
- String
ID de conversation.
- activity
- Activity
Activité à envoyer.
- customHeaders
- Dictionary<String,List<String>>
Les en-têtes qui seront ajoutés à la requête.
- cancellationToken
- CancellationToken
Jeton d’annulation.
Retours
Une tâche qui représente le Microsoft.Rest.HttpOperationResponse.
Exceptions
Déclenché lorsque l’opération a renvoyé un code de statut invalide.
Rejeté lorsqu’il n’est pas possible de désérialiser la réponse.
Lancé lorsqu’un paramètre requis est nul.
Remarques
Cette méthode vous permet d’envoyer une activité à la fin d’une conversation.
Ceci est légèrement différent de ReplyToActivity(). * SendToConversation(conversationId) : ajoute l’activité à la fin de la conversation en fonction de l’horodatage ou de la sémantique du canal. * ReplyToActivity(conversationId,ActivityId) : ajoute l’activité en tant que réponse à une autre activité, si le canal le prend en charge. Si le canal ne prend pas en charge les réponses imbriquées, ReplyToActivity revient à SendToConversation.
Utilisez ReplyToActivity lors de la réponse à une activité spécifique dans la conversation.
Utilisez SendToConversation dans tous les autres cas.