ConversationsExtensions.SendToConversationAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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)
参数
- operations
- IConversations
此扩展方法的操作组。
- conversationId
- String
对话 ID。
- activity
- Activity
要发送的活动。
- cancellationToken
- CancellationToken
取消标记。
返回
注解
此方法允许将活动发送到会话的末尾。
这与 ReplyToActivity () 略有不同。 * SendToConversation (conversationId) - 将根据通道的时间戳或语义将活动追加到会话的末尾。 * ReplyToActivity (conversationId,ActivityId) - 将活动作为回复添加到另一个活动(如果通道支持)。 如果通道不支持嵌套答复,则 ReplyToActivity 将回退到 SendToConversation。
回复对话中的特定活动时,请使用 ReplyToActivity。
在所有其他情况下使用 SendToConversation。
适用于
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)
参数
- operations
- IConversations
- conversationId
- String
- activity
- Activity
- cancellationToken
- CancellationToken
返回
适用于
SendToConversationAsync(IConversations, Activity, CancellationToken)
将活动发送到对话。
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)
参数
- operations
- IConversations
此扩展方法的操作组。
- activity
- Activity
要发送的活动。
- cancellationToken
- CancellationToken
取消标记。
返回
表示异步操作的 Task。
适用于
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)
参数
- operations
- IConversations
- activity
- Activity
- cancellationToken
- CancellationToken