Condividi tramite


ConversationsExtensions.SendToConversationAsync Metodo

Definizione

Overload

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

SendToConversationAsync(IConversations, String, Activity, CancellationToken)
SendToConversationAsync(IConversations, Activity, CancellationToken)

Inviare un'attività a una conversazione.

SendToConversationAsync(IConversations, Activity, CancellationToken)

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

SendToConversation.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametri

operations
IConversations

Gruppo di operazioni per questo metodo di estensione.

conversationId
String

ID conversazione.

activity
Activity

Attività da inviare.

cancellationToken
CancellationToken

Token di annullamento.

Restituisce

Oggetto ResourceResponse.

Commenti

Questo metodo consente di inviare un'attività alla fine di una conversazione.

Questo è leggermente diverso da ReplyToActivity(). * SendToConversation(conversationId) - aggiungerà l'attività alla fine della conversazione in base al timestamp o alla semantica del canale. * ReplyToActivity(conversationId,ActivityId) - aggiunge l'attività come risposta a un'altra attività, se il canale lo supporta. Se il canale non supporta le risposte annidate, ReplyToActivity torna a SendToConversation.

Usare ReplyToActivity quando si risponde a un'attività specifica nella conversazione.

Usare SendToConversation in tutti gli altri casi.

Si applica a

SendToConversationAsync(IConversations, String, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * string * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, conversationId As String, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametri

operations
IConversations
conversationId
String
activity
Activity
cancellationToken
CancellationToken

Restituisce

Si applica a

SendToConversationAsync(IConversations, Activity, CancellationToken)

Inviare un'attività a una conversazione.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametri

operations
IConversations

Gruppo di operazioni per questo metodo di estensione.

activity
Activity

Attività da inviare.

cancellationToken
CancellationToken

Token di annullamento.

Restituisce

Task che rappresenta l'operazione asincrona.

Si applica a

SendToConversationAsync(IConversations, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> SendToConversationAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member SendToConversationAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function SendToConversationAsync (operations As IConversations, activity As Activity, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceResponse)

Parametri

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Restituisce

Si applica a