Share via


DispatchRuntime.InputSessionShutdownHandlers 屬性

定義

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

public:
 property System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::IInputSessionShutdown ^> ^ InputSessionShutdownHandlers { System::Collections::Generic::SynchronizedCollection<System::ServiceModel::Dispatcher::IInputSessionShutdown ^> ^ get(); };
public System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.IInputSessionShutdown> InputSessionShutdownHandlers { get; }
member this.InputSessionShutdownHandlers : System.Collections.Generic.SynchronizedCollection<System.ServiceModel.Dispatcher.IInputSessionShutdown>
Public ReadOnly Property InputSessionShutdownHandlers As SynchronizedCollection(Of IInputSessionShutdown)

屬性值

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

備註

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

適用於