scripts
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Microsoft.Win32.SafeHandles
|
||||
{
|
||||
/// <summary>Provides a base class for Win32 critical handle implementations in which the value of either 0 or -1 indicates an invalid handle.</summary>
|
||||
// Token: 0x0200006D RID: 109
|
||||
public abstract class CriticalHandleZeroOrMinusOneIsInvalid : CriticalHandle, IDisposable
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid" /> class. </summary>
|
||||
// Token: 0x060006E6 RID: 1766 RVA: 0x00015444 File Offset: 0x00013644
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
protected CriticalHandleZeroOrMinusOneIsInvalid()
|
||||
: base((IntPtr)(-1))
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates whether the handle is invalid.</summary>
|
||||
/// <returns>true if the handle is not valid; otherwise, false.</returns>
|
||||
// Token: 0x170000CE RID: 206
|
||||
// (get) Token: 0x060006E7 RID: 1767 RVA: 0x00015454 File Offset: 0x00013654
|
||||
public override bool IsInvalid
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.handle == (IntPtr)(-1) || this.handle == IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user