1212using System . Management . Automation . Runspaces ;
1313using Microsoft . PowerShell . EditorServices . Hosting ;
1414using System . Globalization ;
15- using System . Collections ;
16-
17- // TODO: Remove this when we drop support for PS6.
18- #if CoreCLR
19- using System . Runtime . InteropServices ;
20- #endif
2115
2216#if DEBUG
2317using System . Diagnostics ;
@@ -35,14 +29,6 @@ namespace Microsoft.PowerShell.EditorServices.Commands
3529 [ Cmdlet ( VerbsLifecycle . Start , "EditorServices" , DefaultParameterSetName = "NamedPipe" ) ]
3630 public sealed class StartEditorServicesCommand : PSCmdlet
3731 {
38- // TODO: Remove this when we drop support for PS6.
39- private static readonly bool s_isWindows =
40- #if CoreCLR
41- RuntimeInformation . IsOSPlatform ( OSPlatform . Windows ) ;
42- #else
43- true ;
44- #endif
45-
4632 private readonly List < IDisposable > _disposableResources ;
4733
4834 private readonly List < IDisposable > _loggerUnsubscribers ;
@@ -420,12 +406,7 @@ private ConsoleReplKind GetReplKind()
420406 return ConsoleReplKind . None ;
421407 }
422408
423- // TODO: Remove this when we drop support for PS6.
424- Hashtable psVersionTable = ( Hashtable ) SessionState . PSVariable . GetValue ( "PSVersionTable" ) ;
425- dynamic version = psVersionTable [ "PSVersion" ] ;
426- int majorVersion = ( int ) version . Major ;
427-
428- if ( UseLegacyReadLine || ( ! s_isWindows && majorVersion == 6 ) )
409+ if ( UseLegacyReadLine )
429410 {
430411 _logger . Log ( PsesLogLevel . Diagnostic , "REPL configured as Legacy" ) ;
431412 return ConsoleReplKind . LegacyReadLine ;
0 commit comments