ConversationsExtensions.ReplyToActivityAsync 方法

定义

重载

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

回复现有对话中的活动。

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)

参数

operations
IConversations
activity
Activity
cancellationToken
CancellationToken

返回

适用于

ReplyToActivityAsync(IConversations, Activity, CancellationToken)

回复现有对话中的活动。

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)

参数

operations
IConversations

此扩展方法的操作组。

activity
Activity

要发送的活动。

cancellationToken
CancellationToken

取消标记。

返回

表示异步操作的 Task

适用于

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)

参数

operations
IConversations
conversationId
String
activityId
String
activity
Activity
cancellationToken
CancellationToken

返回

适用于

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)

参数

operations
IConversations

此扩展方法的操作组。

conversationId
String

对话 ID。

activityId
String

activityId 答复 (OPTIONAL) 。

activity
Activity

要发送的活动。

cancellationToken
CancellationToken

取消标记。

返回

ResourceResponse

注解

此方法允许回复活动。

这与 SendToConversation () 略有不同。 * SendToConversation (conversationId) - 将根据通道的时间戳或语义将活动追加到会话的末尾。 * ReplyToActivity (conversationId,ActivityId) - 将活动作为回复添加到另一个活动(如果通道支持)。 如果通道不支持嵌套答复,则 ReplyToActivity 将回退到 SendToConversation。

回复对话中的特定活动时,请使用 ReplyToActivity。

在所有其他情况下使用 SendToConversation。

适用于