16 references to StateBits
System.Private.CoreLib (16)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (16)
67
_state =
StateBits
.RefCountOne; // Ref count 1 and not closed or disposed.
100
public bool IsClosed => (_state &
StateBits
.Closed) ==
StateBits
.Closed;
130
Interlocked.Or(ref _state,
StateBits
.Closed);
172
ObjectDisposedException.ThrowIf((oldState &
StateBits
.Closed) != 0, this);
179
newState = oldState +
StateBits
.RefCountOne;
220
if (disposeOrFinalizeOperation && ((oldState &
StateBits
.Disposed) != 0))
229
ObjectDisposedException.ThrowIf((oldState &
StateBits
.RefCount) == 0, this);
237
performRelease = ((oldState & (
StateBits
.RefCount |
StateBits
.Closed)) ==
StateBits
.RefCountOne) &&
246
newState = oldState -
StateBits
.RefCountOne;
247
if ((oldState &
StateBits
.RefCount) ==
StateBits
.RefCountOne)
249
newState |=
StateBits
.Closed;
253
newState |=
StateBits
.Disposed;