Condividi tramite


ConversationsExtensions.ReplyToActivityAsync Metodo

Definizione

Overload

ReplyToActivityAsync(IConversations, Activity, CancellationToken)
ReplyToActivityAsync(IConversations, Activity, CancellationToken)

Rispondere a un'attività in una conversazione esistente.

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)
ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

ReplyToActivity.

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

public static System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Connector.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Connector.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Connector.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (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

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

Rispondere a un'attività in una conversazione esistente.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (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

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

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

Parametri

operations
IConversations
conversationId
String
activityId
String
activity
Activity
cancellationToken
CancellationToken

Restituisce

Si applica a

ReplyToActivityAsync(IConversations, String, String, Activity, CancellationToken)

ReplyToActivity.

public static System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse> ReplyToActivityAsync (this Microsoft.Bot.Connector.IConversations operations, string conversationId, string activityId, Microsoft.Bot.Schema.Activity activity, System.Threading.CancellationToken cancellationToken = default);
static member ReplyToActivityAsync : Microsoft.Bot.Connector.IConversations * string * string * Microsoft.Bot.Schema.Activity * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Bot.Schema.ResourceResponse>
<Extension()>
Public Function ReplyToActivityAsync (operations As IConversations, conversationId As String, activityId 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.

activityId
String

activityId la risposta è (FACOLTATIVO).

activity
Activity

Attività da inviare.

cancellationToken
CancellationToken

Token di annullamento.

Restituisce

Oggetto ResourceResponse.

Commenti

Questo metodo consente di rispondere a un'attività.

Questo è leggermente diverso da SendToConversation(). * 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 esegue il fallback a SendToConversation.

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

Usare SendToConversation in tutti gli altri casi.

Si applica a