Share via


ConversationalAgentSession.SessionInterrupted Event

Definition

Occurs when another digital assistant activation signal has been detected.

// 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) 

Event Type

Remarks

Some digital assistant sessions cannot be interrupted by another signal. For example, Cortana requires the user to issue a cancel or stop command to end the current session (the user cannot be in a Cortana session and issue commands to Alexa).

If a session can be interrupted, the Windows Conversational Agent platform raises the SessionInterrupted event to indicate that the digital assistant app should set itself to inactive and stop processing input.

Applies to

See also