DispatchRuntime.InputSessionShutdownHandlers 屬性
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得 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 物件來執行清理各個通道狀態,或在關閉通道之前傳送回應訊息。
產品 | 版本 |
---|---|
.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 |