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