UaClient/ServiceModel/Ua/Channels/CommunicationObject.cs
/// <summary>
/// Throws an <see cref="InvalidOperationException"/> if the communication object is not in the created state.
/// </summary>
Throws an  if the communication object is not in the created state.
Throws an if the communication object is not in the created state .
protected void ThrowIfDisposedOrImmutable()
        {
            this.ThrowPending();
            switch (this.State)
            {
                case CommunicationState.Created:
                    return;
                case CommunicationState.Opening:
                case CommunicationState.Opened:
                case CommunicationState.Closing:
                case CommunicationState.Faulted:
                    throw new InvalidOperationException($"Channel not modifiable.");
                case CommunicationState.Closed:
                    throw new InvalidOperationException($"Channel disposed.");
            }
        }
protected void ThrowIfDisposedOrImmutable ( ) { this . ThrowPending ( ) ; switch ( this . State ) { case CommunicationState . Created : return ; case CommunicationState . Opening : case CommunicationState . Opened : case CommunicationState . Closing : case CommunicationState . Faulted : throw new InvalidOperationException ( $" Channel not modifiable. " ) ; case CommunicationState . Closed : throw new InvalidOperationException ( $" Channel disposed. " ) ; } }
Throws an  if the communication object is not in the created state.
Throws an if the communication object is not in the created state .