1 write to SymbolResultTree
System.CommandLine (1)
Parsing\SymbolResult.cs (1)
18
SymbolResultTree
= symbolResultTree ?? throw new ArgumentNullException(nameof(symbolResultTree));
33 references to SymbolResultTree
System.CommandLine (33)
Argument{T}.cs (2)
66
int errorsBefore = argumentResult.
SymbolResultTree
.ErrorCount;
69
if (errorsBefore == argumentResult.
SymbolResultTree
.ErrorCount)
ParseResult.cs (2)
215
=> _rootCommandResult.
SymbolResultTree
.TryGetValue(symbol, out SymbolResult? result) ? result : null;
223
_rootCommandResult.
SymbolResultTree
.GetResult(name);
Parsing\ArgumentResult.cs (6)
108
if (
SymbolResultTree
.TryGetValue(nextArgument, out SymbolResult? symbolResult))
115
nextArgumentResult = new ArgumentResult(nextArgument,
SymbolResultTree
, Parent);
116
SymbolResultTree
.Add(nextArgument, nextArgumentResult);
136
SymbolResultTree
.AddUnmatchedToken(unmatched, parent, rootCommand);
147
SymbolResultTree
.AddError(new ParseError(errorMessage, AppliesToPublicSymbolResult));
233
SymbolResultTree
.AddError(new ParseError(result.ErrorMessage!, AppliesToPublicSymbolResult));
Parsing\CommandResult.cs (14)
38
public IEnumerable<SymbolResult> Children =>
SymbolResultTree
.GetChildren(this);
52
int errorCountBefore =
SymbolResultTree
.ErrorCount;
58
if (
SymbolResultTree
.ErrorCount != errorCountBefore)
91
if (!
SymbolResultTree
.TryGetValue(option, out SymbolResult? symbolResult))
95
optionResult = new(option,
SymbolResultTree
, null, this);
96
SymbolResultTree
.Add(optionResult.Option, optionResult);
98
argumentResult = new(optionResult.Option.Argument,
SymbolResultTree
, optionResult);
99
SymbolResultTree
.Add(optionResult.Option.Argument, argumentResult);
115
argumentResult = (ArgumentResult)
SymbolResultTree
[option.Argument];
127
int errorsBefore =
SymbolResultTree
.ErrorCount;
134
if (errorsBefore !=
SymbolResultTree
.ErrorCount)
157
if (
SymbolResultTree
.TryGetValue(argument, out SymbolResult? symbolResult))
163
argumentResult = new ArgumentResult(argument,
SymbolResultTree
, this);
164
SymbolResultTree
[argument] = argumentResult;
Parsing\ParseDiagramAction.cs (1)
149
foreach (SymbolResult child in symbolResult.
SymbolResultTree
.GetChildren(symbolResult))
Parsing\SymbolResult.cs (7)
29
var parseErrors =
SymbolResultTree
.Errors;
63
public virtual void AddError(string errorMessage) =>
SymbolResultTree
.AddError(new ParseError(errorMessage, this));
70
public ArgumentResult? GetResult(Argument argument) =>
SymbolResultTree
.GetResult(argument);
77
public CommandResult? GetResult(Command command) =>
SymbolResultTree
.GetResult(command);
84
public OptionResult? GetResult(Option option) =>
SymbolResultTree
.GetResult(option);
91
public DirectiveResult? GetResult(Directive directive) =>
SymbolResultTree
.GetResult(directive);
102
SymbolResultTree
.GetResult(name);
Parsing\SymbolResultExtensions.cs (1)
16
.FlattenBreadthFirst(o => o.
SymbolResultTree
.GetChildren(o)))