From 0a033360f9357d84f01e8b2e2c7772e66a094f3a Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 23 Nov 2018 15:38:07 +0500 Subject: [PATCH 1/5] CommonUtilities --- .../CommonUtils.cs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/CommonUtils.cs b/src/Microsoft.PowerShell.Commands.Diagnostics/CommonUtils.cs index 205b13fd191..ba18db34943 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/CommonUtils.cs +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/CommonUtils.cs @@ -5,16 +5,10 @@ using System.Collections; using System.Diagnostics; using System.Globalization; +using System.Reflection; +using System.Resources; using System.Runtime.InteropServices; using System.Text; -using System.Resources; -using System.Reflection; - -#if CORECLR -using System.ComponentModel; -#else -using System.Threading; -#endif namespace Microsoft.PowerShell.Commands.Diagnostics.Common { @@ -38,7 +32,6 @@ public static string StringArrayToString(IEnumerable input) return ret; } -#if CORECLR private const string LibraryLoadDllName = "api-ms-win-core-libraryloader-l1-2-0.dll"; private const string LocalizationDllName = "api-ms-win-core-localization-l1-2-1.dll"; private const string SysInfoDllName = "api-ms-win-core-sysinfo-l1-2-1.dll"; @@ -62,10 +55,6 @@ internal struct OSVERSIONINFOEX [DllImport(SysInfoDllName, CharSet = CharSet.Unicode, SetLastError = true)] internal static extern bool GetVersionEx(ref OSVERSIONINFOEX osVerEx); -#else - private const string LibraryLoadDllName = "kernel32.dll"; - private const string LocalizationDllName = "kernel32.dll"; -#endif private const uint FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100; private const uint FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200; From b10d8d1a5412ce06e0df4742ef44df829e45ee76 Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 23 Nov 2018 15:57:12 +0500 Subject: [PATCH 2/5] CredSSP --- src/Microsoft.WSMan.Management/CredSSP.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Microsoft.WSMan.Management/CredSSP.cs b/src/Microsoft.WSMan.Management/CredSSP.cs index b3e6b40edf4..cf08ea831cc 100644 --- a/src/Microsoft.WSMan.Management/CredSSP.cs +++ b/src/Microsoft.WSMan.Management/CredSSP.cs @@ -18,9 +18,6 @@ using System.Globalization; using System.Security; using System.Threading; -#if CORECLR -using System.Xml.XPath; -#endif using Dbg = System.Management.Automation; From 0cc423d776f502600e4f17261bdcae04d00ad027 Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 23 Nov 2018 16:02:30 +0500 Subject: [PATCH 3/5] WsManHelper.cs --- src/Microsoft.WSMan.Management/WsManHelper.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Microsoft.WSMan.Management/WsManHelper.cs b/src/Microsoft.WSMan.Management/WsManHelper.cs index 2ef2164e166..89c8c52afa0 100644 --- a/src/Microsoft.WSMan.Management/WsManHelper.cs +++ b/src/Microsoft.WSMan.Management/WsManHelper.cs @@ -17,9 +17,6 @@ using System.Management.Automation; using System.Management.Automation.Provider; using System.Threading; -#if CORECLR -using System.Xml.XPath; -#endif namespace Microsoft.WSMan.Management { From 1e9abd1917abcdab8ebfbee2177e7612f129dd7a Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 23 Nov 2018 16:16:46 +0500 Subject: [PATCH 4/5] InternalHost --- .../engine/hostifaces/InternalHost.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/System.Management.Automation/engine/hostifaces/InternalHost.cs b/src/System.Management.Automation/engine/hostifaces/InternalHost.cs index bb94e75ef9d..8615cb40f68 100644 --- a/src/System.Management.Automation/engine/hostifaces/InternalHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/InternalHost.cs @@ -190,11 +190,7 @@ public override CultureInfo CurrentUICulture { get { -#if CORECLR // No CultureInfo.InstalledUICulture In CoreCLR. Locale cannot be changed On CSS. - CultureInfo ci = _externalHostRef.Value.CurrentUICulture ?? CultureInfo.CurrentUICulture; -#else CultureInfo ci = _externalHostRef.Value.CurrentUICulture ?? CultureInfo.InstalledUICulture; -#endif return ci; } } From 2d55e4ce83e6f32656b596b7b6d9d3b6174c665a Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 23 Nov 2018 17:15:17 +0500 Subject: [PATCH 5/5] [Feature]