次の方法で共有


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 イベントを発生させ、デジタル アシスタント アプリがそれ自体を非アクティブに設定し、入力の処理を停止する必要があることを示します。

適用対象

こちらもご覧ください