Sdílet prostřednictvím


Conversations.SendToConversationWithHttpMessagesAsync Metoda

Definice

Přetížení

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

Parametry

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

Návraty

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Implementuje

Platí pro

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

Parametry

conversationId
String

ID konverzace.

activity
Activity

Aktivita, která se má odeslat.

customHeaders
Dictionary<String,List<String>>

Hlavičky, které budou přidány do žádosti.

cancellationToken
CancellationToken

Token zrušení.

Návraty

Task<Microsoft.Rest.HttpOperationResponse<ResourceResponse>>

Objekt odpovědi obsahující text odpovědi a hlavičky odpovědi.

Implementuje

Výjimky

Vyvolá se, když operace vrátila neplatný stavový kód.

Microsoft.Rest.SerializationException

Vyvolána, když nelze deserializovat odpověď.

Microsoft.Rest.ValidationException

Vyvolá se, když se vstupní hodnota neshoduje s očekávaným datovým typem, rozsahem nebo vzorem.

Vyvolá se, když má požadovaný parametr hodnotu null.

Poznámky

Tato metoda umožňuje odeslat aktivitu na konec konverzace.

To se mírně liší od ReplyToActivity(). * SendToConversation(conversationId) - připojí aktivitu na konec konverzace podle časového razítka nebo sémantiky kanálu. * ReplyToActivity(conversationId;ActivityId) – přidá aktivitu jako odpověď na jinou aktivitu, pokud ji kanál podporuje. Pokud kanál nepodporuje vnořené odpovědi, vrátí se ReplyToActivity zpět na SendToConversation.

Při odpovídání na konkrétní aktivitu v konverzaci používejte ReplyToActivity.

Ve všech ostatních případech použijte SendToConversation.

Platí pro