47 references to State
System.Net.Quic (47)
System\Net\Quic\Internal\ResettableValueTaskSource.cs (47)
28private State _state; 39_state = State.None; 58public bool IsCompleted => (State)Volatile.Read(ref Unsafe.As<State, byte>(ref _state)) == State.Completed; 61/// Tries to get a value task representing this task source. If this task source is <see cref="State.None"/>, it'll also transition it into <see cref="State.Awaiting"/> state. 62/// It prevents concurrent operations from being invoked since it'll return <c>false</c> if the task source was already in <see cref="State.Awaiting"/> state. 75if (_state == State.None) 92State state = _state; 95if (state == State.None) 105_state = State.Awaiting; 108if (state is State.None or State.Ready or State.Completed) 123/// Gets a <see cref="Task"/> that will transition to a completed state with the last transition of this source, i.e. into <see cref="State.Completed"/>. 150State state = _state; 153if (state == State.Completed) 160if (state == State.Ready && !_hasWaiter && final) 163state = State.None; 168if (state is State.None or State.Awaiting) 170_state = final ? State.Completed : State.Ready; 178if (state is State.None or State.Awaiting) 185if (state is State.None or State.Awaiting) 196if (state != State.Ready) 204return state != State.Ready; 218/// Tries to transition from <see cref="State.Awaiting"/> to either <see cref="State.Ready"/> or <see cref="State.Completed"/>, depending on the value of <paramref name="final"/>. 221/// <param name="final">Whether this is the final transition to <see cref="State.Completed" /> or just a transition into <see cref="State.Ready"/> from which the task source can be reset back to <see cref="State.None"/>.</param> 229/// Tries to transition from <see cref="State.Awaiting"/> to either <see cref="State.Ready"/> or <see cref="State.Completed"/>, depending on the value of <paramref name="final"/>. 232/// <param name="final">Whether this is the final transition to <see cref="State.Completed" /> or just a transition into <see cref="State.Ready"/> from which the task source can be reset back to <see cref="State.None"/>.</param> 257State state = _state; 262if (state == State.Ready) 265_state = State.None; 270_state = State.Completed; 283_state = State.None;