You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/System.CommandLine.Subsystems/Directives/DiagramSubsystem.cs
+62-62Lines changed: 62 additions & 62 deletions
Original file line number
Diff line number
Diff line change
@@ -76,78 +76,78 @@ private static void Diagram(
76
76
break;
77
77
*/
78
78
79
-
// TODO: This logic is deeply tied to internal types/properties. These aren't things we probably want to expose like SymbolNode. See #2349 for alternatives
80
-
/*
81
-
case ArgumentResult argumentResult:
82
-
{
83
-
var includeArgumentName =
84
-
argumentResult.Argument.FirstParent!.Symbol is CliCommand { HasArguments: true, Arguments.Count: > 1 };
85
-
86
-
if (includeArgumentName)
79
+
// TODO: This logic is deeply tied to internal types/properties. These aren't things we probably want to expose like SymbolNode. See #2349 for alternatives
80
+
/*
81
+
case ArgumentResult argumentResult:
87
82
{
88
-
builder.Append("[ ");
89
-
builder.Append(argumentResult.Argument.Name);
90
-
builder.Append(' ');
91
-
}
83
+
var includeArgumentName =
84
+
argumentResult.Argument.FirstParent!.Symbol is CliCommand { HasArguments: true, Arguments.Count: > 1 };
92
85
93
-
if (argumentResult.Argument.Arity.MaximumNumberOfValues > 0)
Copy file name to clipboardExpand all lines: src/System.CommandLine.Tests/ParserTests.cs
+97-97Lines changed: 97 additions & 97 deletions
Original file line number
Diff line number
Diff line change
@@ -854,124 +854,124 @@ public void Absolute_Windows_style_paths_are_lexed_correctly()
854
854
}
855
855
856
856
/* These tests should be split and those using an explicit default value moved to subsystem, and those using the type default should remain in core (?). This might not be meaningful if the type conversion is correct. What value other than the type default could be used.
857
-
[Fact]
858
-
public void Commands_can_have_default_argument_values()
859
-
{
860
-
var argument = new CliArgument<string>("the-arg")
861
-
{
862
-
DefaultValueFactory = (_) => "default"
863
-
};
857
+
[Fact]
858
+
public void Commands_can_have_default_argument_values()
859
+
{
860
+
var argument = new CliArgument<string>("the-arg")
861
+
{
862
+
DefaultValueFactory = (_) => "default"
863
+
};
864
864
865
-
var command = new CliCommand("command")
866
-
{
867
-
argument
868
-
};
865
+
var command = new CliCommand("command")
866
+
{
867
+
argument
868
+
};
869
869
870
-
ParseResult result = CliParser.Parse(command, "command");
870
+
ParseResult result = CliParser.Parse(command, "command");
871
871
872
-
GetValue(result, argument)
873
-
.Should()
874
-
.Be("default");
875
-
}
872
+
GetValue(result, argument)
873
+
.Should()
874
+
.Be("default");
875
+
}
876
876
877
-
[Fact]
878
-
public void When_an_option_with_a_default_value_is_not_matched_then_the_option_can_still_be_accessed_as_though_it_had_been_applied()
879
-
{
880
-
var command = new CliCommand("command");
881
-
var option = new CliOption<string>("-o", "--option")
882
-
{
883
-
DefaultValueFactory = (_) => "the-default"
884
-
};
885
-
command.Options.Add(option);
877
+
[Fact]
878
+
public void When_an_option_with_a_default_value_is_not_matched_then_the_option_can_still_be_accessed_as_though_it_had_been_applied()
879
+
{
880
+
var command = new CliCommand("command");
881
+
var option = new CliOption<string>("-o", "--option")
882
+
{
883
+
DefaultValueFactory = (_) => "the-default"
884
+
};
885
+
command.Options.Add(option);
886
886
887
-
ParseResult result = CliParser.Parse(command, "command");
887
+
ParseResult result = CliParser.Parse(command, "command");
0 commit comments