Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions src/System.Management.Automation/help/HelpCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,35 +204,9 @@ public SwitchParameter Online
}
private bool _showOnlineHelp;

private bool _showWindow;
/// <summary>
/// Gets and sets a value indicating whether the help should be displayed in a separate window
/// </summary>
[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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
/// <summary>
/// Checks if we can connect to the internet
/// </summary>
/// <returns></returns>
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
Expand Down