Freigeben über


IConversations.ReplyToActivityWithHttpMessagesAsync Methode

Definition

Überlädt

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

ReplyToActivity.

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

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

ReplyToActivity.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Schema.ResourceResponse>> ReplyToActivityWithHttpMessagesAsync (string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplyToActivityWithHttpMessagesAsync : string * 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 ReplyToActivityWithHttpMessagesAsync (conversationId As String, activityId 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

Konversations-ID.

activityId
String

activityId, an die die Antwort lautet (OPTIONAL).

activity
Activity

Zu sendende Aktivität.

customHeaders
Dictionary<String,List<String>>

Die Header, die der Anforderung hinzugefügt werden.

cancellationToken
CancellationToken

Das Abbruchtoken.

Gibt zurück

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Eine Aufgabe, die den Microsoft.Rest.HttpOperationResponsedarstellt.

Ausnahmen

Wird ausgelöst, wenn der Vorgang einen ungültigen Statuscode zurückgegeben hat.

Microsoft.Rest.SerializationException

Wird ausgelöst, wenn die Antwort nicht deserialisiert werden kann.

Microsoft.Rest.ValidationException

Wird ausgelöst, wenn ein erforderlicher Parameter NULL ist.

Hinweise

Mit dieser Methode können Sie auf eine Aktivität antworten.

Dies unterscheidet sich geringfügig von SendToConversation(). * 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.

Gilt für:

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

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Bot.Connector.ResourceResponse>> ReplyToActivityWithHttpMessagesAsync (string conversationId, string activityId, Microsoft.Bot.Connector.Activity activity, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member ReplyToActivityWithHttpMessagesAsync : string * 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 ReplyToActivityWithHttpMessagesAsync (conversationId As String, activityId 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
activityId
String
activity
Activity
customHeaders
Dictionary<String,List<String>>
cancellationToken
CancellationToken

Gibt zurück

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Gilt für: