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 对话代理平台将引发会话中断事件,以指示数字助手应用应将自身设置为非活动状态并停止处理输入。

适用于

另请参阅