diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/PdhSafeHandle.cs b/src/Microsoft.PowerShell.Commands.Diagnostics/PdhSafeHandle.cs index 3a122d8ce..eaa6a401b 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/PdhSafeHandle.cs +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/PdhSafeHandle.cs @@ -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); } } } - -