using System; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; namespace Microsoft.Win32.SafeHandles { /// Provides a base class for Win32 safe handle implementations in which the value of -1 indicates an invalid handle. // Token: 0x0200006F RID: 111 public abstract class SafeHandleMinusOneIsInvalid : SafeHandle, IDisposable { /// Initializes a new instance of the class, specifying whether the handle is to be reliably released. /// true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended). // Token: 0x060006EB RID: 1771 RVA: 0x000154BC File Offset: 0x000136BC [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base((IntPtr)0, ownsHandle) { } /// Gets a value that indicates whether the handle is invalid. /// true if the handle is not valid; otherwise, false. // Token: 0x170000CF RID: 207 // (get) Token: 0x060006EC RID: 1772 RVA: 0x000154CC File Offset: 0x000136CC public override bool IsInvalid { get { return this.handle == (IntPtr)(-1); } } } }