12
12
using System . Management . Automation . Runspaces ;
13
13
using Microsoft . PowerShell . EditorServices . Hosting ;
14
14
using 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
21
15
22
16
#if DEBUG
23
17
using System . Diagnostics ;
@@ -35,14 +29,6 @@ namespace Microsoft.PowerShell.EditorServices.Commands
35
29
[ Cmdlet ( VerbsLifecycle . Start , "EditorServices" , DefaultParameterSetName = "NamedPipe" ) ]
36
30
public sealed class StartEditorServicesCommand : PSCmdlet
37
31
{
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
-
46
32
private readonly List < IDisposable > _disposableResources ;
47
33
48
34
private readonly List < IDisposable > _loggerUnsubscribers ;
@@ -420,12 +406,7 @@ private ConsoleReplKind GetReplKind()
420
406
return ConsoleReplKind . None ;
421
407
}
422
408
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 )
429
410
{
430
411
_logger . Log ( PsesLogLevel . Diagnostic , "REPL configured as Legacy" ) ;
431
412
return ConsoleReplKind . LegacyReadLine ;
0 commit comments