diff --git a/src/System.Management.Automation/help/HelpCommands.cs b/src/System.Management.Automation/help/HelpCommands.cs index 7c22999439b..5766c027060 100644 --- a/src/System.Management.Automation/help/HelpCommands.cs +++ b/src/System.Management.Automation/help/HelpCommands.cs @@ -204,35 +204,9 @@ public SwitchParameter Online } private bool _showOnlineHelp; - private bool _showWindow; - /// - /// Gets and sets a value indicating whether the help should be displayed in a separate window - /// - [Parameter(ParameterSetName = "ShowWindow", Mandatory = true)] - public SwitchParameter ShowWindow - { - get - { - return _showWindow; - } - - set - { - _showWindow = value; - if (_showWindow) - { - VerifyParameterForbiddenInRemoteRunspace(this, "ShowWindow"); - } - } - } - // The following variable controls the view. private HelpView _viewTokenToAdd = HelpView.Default; -#if !CORECLR - private GraphicalHostReflectionWrapper graphicalHostReflectionWrapper; -#endif - private readonly Stopwatch _timer = new Stopwatch(); #if LEGACYTELEMETRY private bool _updatedHelp; @@ -270,12 +244,6 @@ protected override void ProcessRecord() { try { -#if !CORECLR - if (this.ShowWindow) - { - this.graphicalHostReflectionWrapper = GraphicalHostReflectionWrapper.GetGraphicalHostReflectionWrapper(this, "Microsoft.PowerShell.Commands.Internal.HelpWindowHelper"); - } -#endif this.Context.HelpSystem.OnProgress += new HelpSystem.HelpProgressHandler(HelpSystem_OnProgress); bool failed = false; @@ -568,12 +536,6 @@ private void WriteObjectsOrShowOnlineHelp(HelpInfo helpInfo, bool showFullHelp) throw PSTraceSource.NewInvalidOperationException(HelpErrors.NoURIFound); } } - else if (showFullHelp && ShowWindow) - { -#if !CORECLR - graphicalHostReflectionWrapper.CallStaticMethod("ShowHelpWindow", helpInfo.FullHelp, this); -#endif - } else { // show inline help @@ -687,22 +649,13 @@ private void HelpSystem_OnProgress(object sender, HelpProgressInfo arg) WriteProgress(record); } -#if !CORECLR - [DllImport("wininet.dll")] - private static extern bool InternetGetConnectedState(out int desc, int reserved); -#endif /// /// Checks if we can connect to the internet /// /// private bool HasInternetConnection() { -#if CORECLR return true; // TODO:CORECLR wininet.dll is not present on NanoServer -#else - int unused; - return InternetGetConnectedState(out unused, 0); -#endif } #region Helper methods for verification of parameters against NoLanguage mode