Files
Dec2017-Script-Dump/mscorlib/Microsoft/Win32/SafeHandles/SafeWaitHandle.cs
T
2026-06-04 11:42:34 +02:00

30 lines
1.2 KiB
C#

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;
}
}
}