CommunicationObject.OnClosed 方法

定義

在將通訊物件轉換為關閉狀態期間會叫用。Invoked during the transition of a communication object into the closing state.

protected:
 virtual void OnClosed();
protected virtual void OnClosed ();
abstract member OnClosed : unit -> unit
override this.OnClosed : unit -> unit
Protected Overridable Sub OnClosed ()

備註

如果通訊物件一開始處於 Close 狀態,OnClosed 方法就會呼叫 OpenedThe Close method calls OnClosed if the communication object is initially in the Opened state.

如果通訊物件尚未處於 EndClose 狀態,OnClosed 方法就會呼叫 OnEndClose(IAsyncResult) (和 Closed)。The EndClose method calls OnClosed (and OnEndClose(IAsyncResult) if the communication object is not already in a Closed state.

適用於