IConversations.SendToConversationWithHttpMessagesAsync Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
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))
Parameter
- conversationId
- String
- activity
- Activity
- customHeaders
- Dictionary<String,List<String>>
- cancellationToken
- CancellationToken
Gibt zurück
Gilt für:
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))
Parameter
- conversationId
- String
Unterhaltungs-ID.
- activity
- Activity
Zu sendende Aktivität.
- customHeaders
- Dictionary<String,List<String>>
Die Header, die auf Anfrage hinzugefügt werden.
- cancellationToken
- CancellationToken
Das Abbruchtoken.
Gibt zurück
Eine Aufgabe, die das darstellt Microsoft.Rest.HttpOperationResponse.
Ausnahmen
Geworfen, wenn die Operation einen ungültigen Statuscode zurückgab.
Geworfen, wenn man die Reaktion nicht entwerten kann.
Wird geworfen, wenn ein erforderlicher Parameter null ist.
Hinweise
Mit dieser Methode können Sie eine Aktivität an das Ende einer Unterhaltung senden.
Dies unterscheidet sich geringfügig von ReplyToActivity(). * SendToConversation(conversationId) – fügt die Aktivität entsprechend dem Zeitstempel oder der Semantik des Kanals an das Ende der Unterhaltung an. * ReplyToActivity(conversationId,ActivityId) – fügt die Aktivität als Antwort auf eine andere Aktivität hinzu, wenn der Kanal sie unterstützt. Wenn der Kanal keine geschachtelten Antworten unterstützt, greift ReplyToActivity auf SendToConversation zurück.
Verwenden Sie ReplyToActivity, wenn Sie auf eine bestimmte Aktivität in der Unterhaltung antworten.
Verwenden Sie SendToConversation in allen anderen Fällen.