ConversationalAgentSession.RequestInterruptible(Boolean) 方法

定義

如果偵測到另一個數位 助理 的關鍵詞,則同步要求此 ConversationalAgentSession 可中斷。

重要

若要避免可能的並行問題,建議您改用 RequestInterruptibleAsync

public:
 virtual ConversationalAgentSessionUpdateResponse RequestInterruptible(bool interruptible) = RequestInterruptible;
ConversationalAgentSessionUpdateResponse RequestInterruptible(bool const& interruptible);
public ConversationalAgentSessionUpdateResponse RequestInterruptible(bool interruptible);
function requestInterruptible(interruptible)
Public Function RequestInterruptible (interruptible As Boolean) As ConversationalAgentSessionUpdateResponse

參數

interruptible
Boolean

bool

如果可中斷,則為 True;否則為 false。

傳回

ConversationalAgentSessionUpdateResponse

備註

某些數位 助理 會話無法被另一個訊號中斷。 例如,Cortana 要求使用者發出取消或停止命令以結束目前的會話, (使用者不能在 Cortana 會話中,並將命令發出至) 。

如果會話可以中斷,Windows 對話代理程式平臺會引發 SessionInterrupted 事件,指出數位 助理 應用程式應該將本身設定為非使用中,並停止處理輸入。

適用於

另請參閱