CommunicationObject.ThrowIfDisposedOrNotOpen 方法

定義

如果通訊物件不是處於 Opened 狀態,就會擲回例外狀況。

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 狀態,無法使用。

通訊物件處於 ClosingClosed 狀態,無法修改。

通訊物件處於 Faulted 狀態,無法修改。

適用於