SlackAdapter.ContinueConversationAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
ContinueConversationAsync(ConversationReference, BotCallbackHandler, CancellationToken) |
标准 BotBuilder 适配器方法,用于基于会话引用继续现有会话。 |
ContinueConversationAsync(ClaimsIdentity, ConversationReference, BotCallbackHandler, CancellationToken) |
将主动消息从机器人发送到对话。 |
ContinueConversationAsync(ConversationReference, BotCallbackHandler, CancellationToken)
标准 BotBuilder 适配器方法,用于基于会话引用继续现有会话。
public System.Threading.Tasks.Task ContinueConversationAsync(Microsoft.Bot.Schema.ConversationReference reference, Microsoft.Bot.Builder.BotCallbackHandler logic, System.Threading.CancellationToken cancellationToken);
override this.ContinueConversationAsync : Microsoft.Bot.Schema.ConversationReference * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ContinueConversationAsync (reference As ConversationReference, logic As BotCallbackHandler, cancellationToken As CancellationToken) As Task
参数
- reference
- ConversationReference
要应用于未来消息的会话引用。
- logic
- BotCallbackHandler
一个机器人逻辑函数,它将以“async (context) => { ... }”的形式执行后续操作。
- cancellationToken
- CancellationToken
任务的取消令牌。
返回
表示异步操作的 Task。
适用于
ContinueConversationAsync(ClaimsIdentity, ConversationReference, BotCallbackHandler, CancellationToken)
将主动消息从机器人发送到对话。
public override System.Threading.Tasks.Task ContinueConversationAsync(System.Security.Claims.ClaimsIdentity claimsIdentity, Microsoft.Bot.Schema.ConversationReference reference, Microsoft.Bot.Builder.BotCallbackHandler callback, System.Threading.CancellationToken cancellationToken);
override this.ContinueConversationAsync : System.Security.Claims.ClaimsIdentity * Microsoft.Bot.Schema.ConversationReference * Microsoft.Bot.Builder.BotCallbackHandler * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function ContinueConversationAsync (claimsIdentity As ClaimsIdentity, reference As ConversationReference, callback As BotCallbackHandler, cancellationToken As CancellationToken) As Task
参数
- claimsIdentity
- ClaimsIdentity
会话的 。ClaimsIdentity
- reference
- ConversationReference
对要继续的对话的引用。
- callback
- BotCallbackHandler
要为生成的机器人轮次调用的方法。
- cancellationToken
- CancellationToken
取消标记。
返回
一个任务,表示排队要执行的工作。
注解
调用此方法可主动向对话发送消息。 大多数_channels要求用户先与机器人初始化对话,然后机器人才能向用户发送活动。
此方法为轮次注册以下服务。
- IIdentity (密钥 = “BotIdentity”) ,机器人的声明声明 Identity。