Dela via


IConversations.ReplyToActivityWithHttpMessagesAsync Metod

Definition

Överlagringar

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))

Parametrar

conversationId
String

Konversations-ID.

activityId
String

activityId svaret är till (VALFRITT).

activity
Activity

Aktivitet att skicka.

customHeaders
Dictionary<String,List<String>>

Rubrikerna som läggs till i begäran.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

En uppgift som representerar Microsoft.Rest.HttpOperationResponse.

Undantag

Utlöses när åtgärden returnerade en ogiltig statuskod.

Microsoft.Rest.SerializationException

Utlöses när det inte går att deserialisera svaret.

Microsoft.Rest.ValidationException

Genereras när en obligatorisk parameter är null.

Kommentarer

Med den här metoden kan du svara på en aktivitet.

Detta skiljer sig något från SendToConversation(). * SendToConversation(conversationId) – lägger till aktiviteten i slutet av konversationen enligt tidsstämpeln eller semantiken i kanalen. * ReplyToActivity(conversationId,ActivityId) – lägger till aktiviteten som ett svar på en annan aktivitet, om kanalen stöder den. Om kanalen inte stöder kapslade svar återgår ReplyToActivity till SendToConversation.

Använd ReplyToActivity när du svarar på en specifik aktivitet i konversationen.

Använd SendToConversation i alla andra fall.

Gäller 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))

Parametrar

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

Returer

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Gäller för