ConversationalAgentSession.SessionInterrupted 事件

定义

检测到另一个数字助手激活信号时发生。

// 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 事件,以指示数字助手应用应将自身设置为非活动状态并停止处理输入。

适用于

另请参阅