Skip to content

Commit ffa0701

Browse files
SteveL-MSFTadityapatwardhan
authored andcommitted
remove unsupported -showwindow switch (PowerShell#4903)
1 parent d20d6a6 commit ffa0701

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

src/System.Management.Automation/help/HelpCommands.cs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -204,35 +204,9 @@ public SwitchParameter Online
204204
}
205205
private bool _showOnlineHelp;
206206

207-
private bool _showWindow;
208-
/// <summary>
209-
/// Gets and sets a value indicating whether the help should be displayed in a separate window
210-
/// </summary>
211-
[Parameter(ParameterSetName = "ShowWindow", Mandatory = true)]
212-
public SwitchParameter ShowWindow
213-
{
214-
get
215-
{
216-
return _showWindow;
217-
}
218-
219-
set
220-
{
221-
_showWindow = value;
222-
if (_showWindow)
223-
{
224-
VerifyParameterForbiddenInRemoteRunspace(this, "ShowWindow");
225-
}
226-
}
227-
}
228-
229207
// The following variable controls the view.
230208
private HelpView _viewTokenToAdd = HelpView.Default;
231209

232-
#if !CORECLR
233-
private GraphicalHostReflectionWrapper graphicalHostReflectionWrapper;
234-
#endif
235-
236210
private readonly Stopwatch _timer = new Stopwatch();
237211
#if LEGACYTELEMETRY
238212
private bool _updatedHelp;
@@ -270,12 +244,6 @@ protected override void ProcessRecord()
270244
{
271245
try
272246
{
273-
#if !CORECLR
274-
if (this.ShowWindow)
275-
{
276-
this.graphicalHostReflectionWrapper = GraphicalHostReflectionWrapper.GetGraphicalHostReflectionWrapper(this, "Microsoft.PowerShell.Commands.Internal.HelpWindowHelper");
277-
}
278-
#endif
279247
this.Context.HelpSystem.OnProgress += new HelpSystem.HelpProgressHandler(HelpSystem_OnProgress);
280248

281249
bool failed = false;
@@ -568,12 +536,6 @@ private void WriteObjectsOrShowOnlineHelp(HelpInfo helpInfo, bool showFullHelp)
568536
throw PSTraceSource.NewInvalidOperationException(HelpErrors.NoURIFound);
569537
}
570538
}
571-
else if (showFullHelp && ShowWindow)
572-
{
573-
#if !CORECLR
574-
graphicalHostReflectionWrapper.CallStaticMethod("ShowHelpWindow", helpInfo.FullHelp, this);
575-
#endif
576-
}
577539
else
578540
{
579541
// show inline help
@@ -687,22 +649,13 @@ private void HelpSystem_OnProgress(object sender, HelpProgressInfo arg)
687649
WriteProgress(record);
688650
}
689651

690-
#if !CORECLR
691-
[DllImport("wininet.dll")]
692-
private static extern bool InternetGetConnectedState(out int desc, int reserved);
693-
#endif
694652
/// <summary>
695653
/// Checks if we can connect to the internet
696654
/// </summary>
697655
/// <returns></returns>
698656
private bool HasInternetConnection()
699657
{
700-
#if CORECLR
701658
return true; // TODO:CORECLR wininet.dll is not present on NanoServer
702-
#else
703-
int unused;
704-
return InternetGetConnectedState(out unused, 0);
705-
#endif
706659
}
707660

708661
#region Helper methods for verification of parameters against NoLanguage mode

0 commit comments

Comments
 (0)