mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Cleanup '#if CORE' in PdhSafeHandle.cs (#4399)
This commit is contained in:
1 parent
df1056d28e
commit
dd3e7cd1f7
1 file changed
-10
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user