@@ -204,35 +204,9 @@ public SwitchParameter Online
204
204
}
205
205
private bool _showOnlineHelp ;
206
206
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
-
229
207
// The following variable controls the view.
230
208
private HelpView _viewTokenToAdd = HelpView . Default ;
231
209
232
- #if ! CORECLR
233
- private GraphicalHostReflectionWrapper graphicalHostReflectionWrapper ;
234
- #endif
235
-
236
210
private readonly Stopwatch _timer = new Stopwatch ( ) ;
237
211
#if LEGACYTELEMETRY
238
212
private bool _updatedHelp ;
@@ -270,12 +244,6 @@ protected override void ProcessRecord()
270
244
{
271
245
try
272
246
{
273
- #if ! CORECLR
274
- if ( this . ShowWindow )
275
- {
276
- this . graphicalHostReflectionWrapper = GraphicalHostReflectionWrapper . GetGraphicalHostReflectionWrapper ( this , "Microsoft.PowerShell.Commands.Internal.HelpWindowHelper" ) ;
277
- }
278
- #endif
279
247
this . Context . HelpSystem . OnProgress += new HelpSystem . HelpProgressHandler ( HelpSystem_OnProgress ) ;
280
248
281
249
bool failed = false ;
@@ -568,12 +536,6 @@ private void WriteObjectsOrShowOnlineHelp(HelpInfo helpInfo, bool showFullHelp)
568
536
throw PSTraceSource . NewInvalidOperationException ( HelpErrors . NoURIFound ) ;
569
537
}
570
538
}
571
- else if ( showFullHelp && ShowWindow )
572
- {
573
- #if ! CORECLR
574
- graphicalHostReflectionWrapper . CallStaticMethod ( "ShowHelpWindow" , helpInfo . FullHelp , this ) ;
575
- #endif
576
- }
577
539
else
578
540
{
579
541
// show inline help
@@ -687,22 +649,13 @@ private void HelpSystem_OnProgress(object sender, HelpProgressInfo arg)
687
649
WriteProgress ( record ) ;
688
650
}
689
651
690
- #if ! CORECLR
691
- [ DllImport ( "wininet.dll" ) ]
692
- private static extern bool InternetGetConnectedState ( out int desc , int reserved ) ;
693
- #endif
694
652
/// <summary>
695
653
/// Checks if we can connect to the internet
696
654
/// </summary>
697
655
/// <returns></returns>
698
656
private bool HasInternetConnection ( )
699
657
{
700
- #if CORECLR
701
658
return true ; // TODO:CORECLR wininet.dll is not present on NanoServer
702
- #else
703
- int unused ;
704
- return InternetGetConnectedState ( out unused , 0 ) ;
705
- #endif
706
659
}
707
660
708
661
#region Helper methods for verification of parameters against NoLanguage mode
0 commit comments