ConversationalAgentSession.SessionInterrupted 事件
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
// Register
event_token SessionInterrupted(TypedEventHandler<ConversationalAgentSession, ConversationalAgentSessionInterruptedEventArgs const&> const& handler) const;
// Revoke with event_token
void SessionInterrupted(event_token const* cookie) const;
// Revoke with event_revoker
ConversationalAgentSession::SessionInterrupted_revoker SessionInterrupted(auto_revoke_t, TypedEventHandler<ConversationalAgentSession, ConversationalAgentSessionInterruptedEventArgs const&> const& handler) const;
public event TypedEventHandler<ConversationalAgentSession,ConversationalAgentSessionInterruptedEventArgs> SessionInterrupted;
function onSessionInterrupted(eventArgs) { /* Your code */ }
conversationalAgentSession.addEventListener("sessioninterrupted", onSessionInterrupted);
conversationalAgentSession.removeEventListener("sessioninterrupted", onSessionInterrupted);
- or -
conversationalAgentSession.onsessioninterrupted = onSessionInterrupted;
Public Custom Event SessionInterrupted As TypedEventHandler(Of ConversationalAgentSession, ConversationalAgentSessionInterruptedEventArgs)
事件类型
注解
某些数字助手会话不能被另一个信号中断。 例如,Cortana 要求用户发出取消或停止命令以结束当前会话, (用户不能处于 Cortana 会话中,并) 向 Alexa 发出命令。
如果会话可以中断,Windows Conversational Agent 平台将引发 SessionInterrupted 事件,以指示数字助手应用应将自身设置为非活动状态并停止处理输入。
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈