ThrowIfInvalidState() static private method

static private ThrowIfInvalidState ( WebSocketState currentState, bool isDisposed, WebSocketState validStates ) : void
currentState WebSocketState
isDisposed bool
validStates WebSocketState
return void
 public void InterlockedCheckValidStates(WebSocketState[] validStates)
 {
     lock (_lock)
     {
         ClientWebSocket.ThrowIfInvalidState(_state, _disposed, validStates);
     }
 }
 // Must be called with Lock taken.
 public void CheckValidState(WebSocketState[] validStates)
 {
     ClientWebSocket.ThrowIfInvalidState(_state, _disposed, validStates);
 }