CommunicationObject.ThrowIfDisposed 方法

定義

如果已處置通訊物件,則會擲回例外狀況。Throws an exception if the communication object is disposed.

protected:
 void ThrowIfDisposed();
protected void ThrowIfDisposed ();
member this.ThrowIfDisposed : unit -> unit
Protected Sub ThrowIfDisposed ()

例外狀況

通訊物件處於 ClosingClosed 狀態中。The communication object is in a Closing or Closed state.

通訊物件處於 Faulted 狀態中。The communication object is in a Faulted state.

備註

如果通訊物件處於 Created, OpeningOpened 狀態,則不會擲回例外狀況。No exception is thrown if the communication object is in a Created, Opening or Opened state. 一旦針對通訊物件呼叫 Close,就會處置該物件。A communication object is disposed once Close is called on it.

適用於