語言

DispatchRuntime.AutomaticInputSessionShutdown 屬性

定義

取得或設定一個值,指定服務是否在客戶端關閉輸出會話時關閉輸入會話。

public:
 property bool AutomaticInputSessionShutdown { bool get(); void set(bool value); };
public bool AutomaticInputSessionShutdown { get; set; }
member this.AutomaticInputSessionShutdown : bool with get, set
Public Property AutomaticInputSessionShutdown As Boolean

屬性值

true如果服務在客戶端關閉輸出會話時關閉輸入會話;否則,。 false 預設值為 true。

備註

如果你將屬性 AutomaticInputSessionShutdown 設為 false,該通道必須被其他機制封閉。 在這種情況下,你必須在屬性中新增自訂的 session shutdown handler InputSessionShutdownHandlers 。

預設情況下,當用戶端關閉輸出會話且服務已完成剩餘訊息處理時,伺服器會關閉該會話。 設定 AutomaticInputSessionShutdown 可以 false 防止伺服器自動關閉會話,並啟用自訂會話壽命控制。

適用於