Cleanup '#if CORE' in PdhSafeHandle.cs (#4399)
This commit is contained in:
parent
df1056d28e
commit
dd3e7cd1f7
|
@ -5,9 +5,7 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#if !CORECLR
|
||||
using System.Runtime.ConstrainedExecution;
|
||||
#endif
|
||||
|
||||
namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
||||
{
|
||||
|
@ -24,9 +22,7 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
|
||||
|
||||
#if !CORECLR // ReliabilityContract not supported on CoreCLR
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
#endif
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseLog(handle, 0) == 0);
|
||||
|
@ -49,9 +45,7 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
|
||||
|
||||
#if !CORECLR // ReliabilityContract not supported on CoreCLR
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
#endif
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseQuery(handle) == 0);
|
||||
|
@ -71,14 +65,10 @@ namespace Microsoft.Powershell.Commands.GetCounter.PdhNative
|
|||
}
|
||||
|
||||
|
||||
#if !CORECLR // ReliabilityContract not supported on CoreCLR
|
||||
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
|
||||
#endif
|
||||
protected override bool ReleaseHandle()
|
||||
{
|
||||
return (PdhHelper.PdhCloseLog(handle, 0) == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue