File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
System.CommandLine.Subsystems Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 5
5
6
6
namespace System . CommandLine
7
7
{
8
- // TODO: Added to project and made public for use in ErrorReportingSubsystem
9
- public static class ConsoleHelpers
8
+ internal static class ConsoleHelpers
10
9
{
11
10
private static readonly bool ColorsAreSupported = GetColorsAreSupported ( ) ;
12
11
@@ -21,15 +20,15 @@ private static bool GetColorsAreSupported()
21
20
#endif
22
21
&& ! Console . IsOutputRedirected ;
23
22
24
- public static void SetTerminalForegroundRed ( )
23
+ internal static void SetTerminalForegroundRed ( )
25
24
{
26
25
if ( ColorsAreSupported )
27
26
{
28
27
Console . ForegroundColor = ConsoleColor . Red ;
29
28
}
30
29
}
31
30
32
- public static void ResetTerminalForegroundColor ( )
31
+ internal static void ResetTerminalForegroundColor ( )
33
32
{
34
33
if ( ColorsAreSupported )
35
34
{
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ protected internal override bool GetIsActivated(ParseResult? parseResult)
26
26
protected internal override CliExit Execute ( PipelineContext pipelineContext )
27
27
{
28
28
var _ = pipelineContext . ParseResult
29
- ?? throw new ArgumentNullException ( $ " { nameof ( pipelineContext ) } .ParseResult" ) ;
29
+ ?? throw new ArgumentException ( "The parse result has not been set" , nameof ( pipelineContext ) ) ;
30
30
31
31
Report ( pipelineContext . ConsoleHack , pipelineContext . ParseResult . Errors ) ;
32
32
Original file line number Diff line number Diff line change 46
46
<Compile Include =" CliOption{T}.cs" />
47
47
<Compile Include =" CliRootCommand.cs" />
48
48
<Compile Include =" CliSymbol.cs" />
49
- <Compile Include =" ConsoleHelpers.cs" />
50
49
<Compile Include =" LocalizationResources.cs" />
51
50
<Compile Include =" ParseResult.cs" />
52
51
<Compile Include =" Parsing\ArgumentResult.cs" />
You can’t perform that action at this time.
0 commit comments