36 references to NestedState
System.Net.Security (36)
System\Net\Security\SslStream.cs (5)
177private NestedState _nestedWrite; 178private NestedState _nestedRead; 746if (Interlocked.Exchange(ref _nestedRead, NestedState.StreamInUse) == NestedState.StreamInUse) 767_nestedRead = NestedState.StreamNotInUse;
System\Net\Security\SslStream.IO.cs (31)
19private NestedState _nestedAuth; 65if (Interlocked.Exchange(ref _nestedRead, NestedState.StreamDisposed) == NestedState.StreamNotInUse && 66Interlocked.Exchange(ref _nestedAuth, NestedState.StreamDisposed) == NestedState.StreamNotInUse) 194if (Interlocked.CompareExchange(ref _nestedAuth, NestedState.StreamInUse, NestedState.StreamNotInUse) != NestedState.StreamNotInUse) 196ObjectDisposedException.ThrowIf(_nestedAuth == NestedState.StreamDisposed, this); 200if (Interlocked.CompareExchange(ref _nestedRead, NestedState.StreamInUse, NestedState.StreamNotInUse) != NestedState.StreamNotInUse) 202ObjectDisposedException.ThrowIf(_nestedRead == NestedState.StreamDisposed, this); 207if (Interlocked.Exchange(ref _nestedWrite, NestedState.StreamInUse) != NestedState.StreamNotInUse) 209_nestedRead = NestedState.StreamNotInUse; 272_nestedRead = NestedState.StreamNotInUse; 273_nestedWrite = NestedState.StreamNotInUse; 291if (Interlocked.Exchange(ref _nestedAuth, NestedState.StreamInUse) == NestedState.StreamInUse) 385_nestedAuth = NestedState.StreamNotInUse; 555if (_nestedAuth != NestedState.StreamInUse) 805if (_sslAuthenticationOptions.AllowRenegotiation || SslProtocol == SslProtocols.Tls13 || _nestedAuth != NestedState.StreamNotInUse) 828if (Interlocked.CompareExchange(ref _nestedRead, NestedState.StreamInUse, NestedState.StreamNotInUse) != NestedState.StreamNotInUse) 830ObjectDisposedException.ThrowIf(_nestedRead == NestedState.StreamDisposed, this); 955_nestedRead = NestedState.StreamNotInUse; 970if (Interlocked.Exchange(ref _nestedWrite, NestedState.StreamInUse) == NestedState.StreamInUse) 993_nestedWrite = NestedState.StreamNotInUse;