30 references to State
System.Net.Sockets (30)
System\Net\Sockets\SocketAsyncContext.Unix.cs (30)
122private volatile AsyncOperation.State _state; 144_state = State.Waiting; 157State oldState = Interlocked.CompareExchange(ref _state, State.Running, State.Waiting); 158if (oldState == State.Canceled) 164Debug.Assert(oldState == State.Waiting, $"Unexpected operation state: {(State)oldState}"); 169Debug.Assert(_state is State.Running or State.RunningWithPendingCancellation, "Unexpected operation state"); 171_state = State.Complete; 178State newState; 181State state = _state; 182Debug.Assert(state is State.Running or State.RunningWithPendingCancellation, $"Unexpected operation state: {(State)state}"); 184newState = (state == State.Running ? State.Waiting : State.Canceled); 193if (newState == State.Canceled) 211State newState; 214State state = _state; 215if (state is State.Complete or State.Canceled or State.RunningWithPendingCancellation) 220newState = (state == State.Waiting ? State.Canceled : State.RunningWithPendingCancellation); 229if (newState == State.RunningWithPendingCancellation) 246Debug.Assert(_state == State.Canceled);