Delen via


Conversations.SendToConversationWithHttpMessagesAsync Methode

Definitie

Overloads

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

Parameters

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

Retouren

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implementeringen

Van toepassing op

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

Parameters

conversationId
String

Gespreks-id.

activity
Activity

Activiteit die moet worden verzonden.

customHeaders
Dictionary<String,List<String>>

Headers die worden toegevoegd aan de aanvraag.

cancellationToken
CancellationToken

Het annuleringstoken.

Retouren

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Een antwoordobject met de antwoordtekst en antwoordheaders.

Implementeringen

Uitzonderingen

Gegenereerd wanneer de bewerking een ongeldige statuscode heeft geretourneerd.

Microsoft.Rest.SerializationException

Gegenereerd wanneer het antwoord niet kan worden gedeserialiseerd.

Microsoft.Rest.ValidationException

Gegenereerd wanneer een invoerwaarde niet overeenkomt met het verwachte gegevenstype, -bereik of -patroon.

Gegenereerd wanneer een vereiste parameter null is.

Opmerkingen

Met deze methode kunt u een activiteit naar het einde van een gesprek verzenden.

Dit verschilt enigszins van ReplyToActivity(). * SendToConversation(conversationId): voegt de activiteit toe aan het einde van het gesprek volgens de tijdstempel of semantiek van het kanaal. * ReplyToActivity(conversationId,ActivityId): voegt de activiteit toe als een antwoord op een andere activiteit, als het kanaal dit ondersteunt. Als het kanaal geen ondersteuning biedt voor geneste antwoorden, valt ReplyToActivity terug op SendToConversation.

Gebruik ReplyToActivity bij het beantwoorden van een specifieke activiteit in het gesprek.

Gebruik SendToConversation in alle andere gevallen.

Van toepassing op