Dela via


ConversationsExtensions.ReplyToActivityAsync Metod

Definition

Överlagringar

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

Svara på en aktivitet i en befintlig konversation.

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)

Parametrar

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

Returer

Gäller för

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

Svara på en aktivitet i en befintlig konversation.

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)

Parametrar

operations
IConversations

Åtgärdsgruppen för den här tilläggsmetoden.

activity
Activity

Aktivitet att skicka.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

En Task som representerar den asynkrona åtgärden.

Gäller för

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)

Parametrar

operations
IConversations
conversationId
String
activityId
String
activity
Activity
cancellationToken
CancellationToken

Returer

Gäller för

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)

Parametrar

operations
IConversations

Åtgärdsgruppen för den här tilläggsmetoden.

conversationId
String

Konversations-ID.

activityId
String

activityId svaret är till (VALFRITT).

activity
Activity

Aktivitet att skicka.

cancellationToken
CancellationToken

Annulleringstoken.

Returer

ResourceResponse.

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