CommunicationObject.ThrowIfDisposedOrNotOpen 方法

定義

如果通訊物件不是處於 Opened 狀態,就會擲回例外狀況。Throws an exception if the communication object is not in the Opened state.

protected public:
 void ThrowIfDisposedOrNotOpen();
protected:
 void ThrowIfDisposedOrNotOpen();
protected internal void ThrowIfDisposedOrNotOpen ();
protected void ThrowIfDisposedOrNotOpen ();
member this.ThrowIfDisposedOrNotOpen : unit -> unit
Protected Friend Sub ThrowIfDisposedOrNotOpen ()
Protected Sub ThrowIfDisposedOrNotOpen ()

例外狀況

通訊物件不是處於 CreatedOpening 狀態,無法使用。The communication object is not in a Created or Opening state and cannot be used.

通訊物件處於 ClosingClosed 狀態,無法修改。The communication object is in a Closing or Closed state and cannot be modified.

通訊物件處於 Faulted 狀態,無法修改。The communication object is in a Faulted state and cannot be modified.

適用於