16 references to StateBits
System.Private.CoreLib (16)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (16)
60
_state =
StateBits
.RefCountOne; // Ref count 1 and not closed or disposed.
93
public bool IsClosed => (_state &
StateBits
.Closed) ==
StateBits
.Closed;
123
Interlocked.Or(ref _state,
StateBits
.Closed);
165
ObjectDisposedException.ThrowIf((oldState &
StateBits
.Closed) != 0, this);
172
newState = oldState +
StateBits
.RefCountOne;
213
if (disposeOrFinalizeOperation && ((oldState &
StateBits
.Disposed) != 0))
222
ObjectDisposedException.ThrowIf((oldState &
StateBits
.RefCount) == 0, this);
230
performRelease = ((oldState & (
StateBits
.RefCount |
StateBits
.Closed)) ==
StateBits
.RefCountOne) &&
239
newState = oldState -
StateBits
.RefCountOne;
240
if ((oldState &
StateBits
.RefCount) ==
StateBits
.RefCountOne)
242
newState |=
StateBits
.Closed;
246
newState |=
StateBits
.Disposed;