scripts
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
using System.Threading;
|
||||
|
||||
namespace Microsoft.Win32.SafeHandles
|
||||
{
|
||||
/// <summary>Represents a wrapper class for a wait handle. </summary>
|
||||
// Token: 0x02000071 RID: 113
|
||||
public sealed class SafeWaitHandle : SafeHandleZeroOrMinusOneIsInvalid
|
||||
{
|
||||
/// <summary>Initializes a new instance of the <see cref="T:Microsoft.Win32.SafeHandles.SafeWaitHandle" /> class. </summary>
|
||||
/// <param name="existingHandle">An <see cref="T:System.IntPtr" /> object that represents the pre-existing handle to use.</param>
|
||||
/// <param name="ownsHandle">true to reliably release the handle during the finalization phase; false to prevent reliable release (not recommended).</param>
|
||||
// Token: 0x060006EF RID: 1775 RVA: 0x00015528 File Offset: 0x00013728
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
public SafeWaitHandle(IntPtr existingHandle, bool ownsHandle)
|
||||
: base(ownsHandle)
|
||||
{
|
||||
base.SetHandle(existingHandle);
|
||||
}
|
||||
|
||||
// Token: 0x060006F0 RID: 1776 RVA: 0x00015538 File Offset: 0x00013738
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
NativeEventCalls.CloseEvent_internal(this.handle);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user