Object. On Closed 方法
在將通訊物件轉換為關閉狀態期間會叫用。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 ()
如果通訊物件尚未處於 EndClose 狀態，OnClosed 方法就會呼叫 OnEndClose(IAsyncResult) (和 Closed)。The EndClose method calls OnClosed (and OnEndClose(IAsyncResult) if the communication object is not already in a Closed state.