CommunicationObject.ThrowIfDisposedOrImmutable Method


Throws an exception if the communication object the State property is not set to the Created state.

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


The communication object is in a Opening or Opened state.

The communication object is in a Closing or Closed state.

The communication object is in a Faulted state.


Since an object is immutable after Open is called on it, the only state that is both mutable and not disposed is the Created state.

Applies to