閱讀英文

共用方式為


DispatchRuntime.InputSessionShutdownHandlers 屬性

定義

取得 IInputSessionShutdown 物件的集合,該集合可用於新增自訂處理常式來控制輸入工作階段的關閉方式。

public System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.IInputSessionShutdown> InputSessionShutdownHandlers { get; }

屬性值

SynchronizedCollection<T>,型別為 IInputSessionShutdown 物件。

備註

IInputSessionShutdown 物件新增至這個屬性,即可控制輸入工作階段的關閉方式。 如果在 IInputChannel.Receive 上呼叫 System.ServiceModel.Channels.IDuplexSessionChannel 方法時是先傳回 null (表示該輸入工作階段已關閉),發送器就會叫用各個 IInputSessionShutdown 物件,並將 System.ServiceModel.Channels.IDuplexSessionChannel 物件傳給它。 自訂 IInputSessionShutdown 物件可以使用這個 IDuplexSessionChannel 物件來執行清理各個通道狀態,或在關閉通道之前傳送回應訊息。

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1