WebSocket.ThrowOnInvalidState(WebSocketState, WebSocketState[]) Metodo

Definizione

Verifica che la connessione sia in uno stato previsto.Verifies that the connection is in an expected state.

protected:
 static void ThrowOnInvalidState(System::Net::WebSockets::WebSocketState state, ... cli::array <System::Net::WebSockets::WebSocketState> ^ validStates);
protected static void ThrowOnInvalidState (System.Net.WebSockets.WebSocketState state, params System.Net.WebSockets.WebSocketState[] validStates);
static member ThrowOnInvalidState : System.Net.WebSockets.WebSocketState * System.Net.WebSockets.WebSocketState[] -> unit
Protected Shared Sub ThrowOnInvalidState (state As WebSocketState, ParamArray validStates As WebSocketState())

Parametri

state
WebSocketState

Lo stato corrente di WebSocket di cui eseguire il test con l'elenco degli stati validi.The current state of the WebSocket to be tested against the list of valid states.

validStates
WebSocketState[]

Elenco di stati di connessione validi.List of valid connection states.

Si applica a