4 types derived from Symbol
System.CommandLine (4)
Argument.cs (1)
15
public abstract class Argument :
Symbol
Command.cs (1)
25
public class Command :
Symbol
, IEnumerable
Directive.cs (1)
21
public class Directive :
Symbol
Option.cs (1)
15
public abstract class Option :
Symbol
70 references to Symbol
Microsoft.DotNet.Cli.CommandLine (3)
ForwardedOptionExtensions.cs (1)
16
private static readonly Dictionary<
Symbol
, Func<ParseResult, IEnumerable<string>>> s_forwardingFunctions = [];
SymbolDocumentationExtensions.cs (2)
13
private static readonly Dictionary<
Symbol
, string> s_documentationLinks = new();
16
extension(
Symbol
symbol)
Microsoft.DotNet.Cli.Definitions (16)
Help\HelpBuilder.cs (9)
15
private Dictionary<
Symbol
, Customization>? _customizationsBySymbol;
63
Symbol
symbol,
98
Symbol
symbol,
176
Symbol
symbol,
244
string GetSymbolDefaultValue(
Symbol
symbol)
261
private static IEnumerable<
Symbol
> GetParameters(
Symbol
symbol)
503
Symbol
parent,
504
Symbol
parameter,
Help\HelpBuilder.Default.cs (6)
22
public static string GetArgumentDefaultValue(
Symbol
parameter)
48
public static string GetArgumentUsageLabel(
Symbol
parameter)
58
static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources,
Symbol
symbol, ArgumentArity arity)
179
foreach (
Symbol
parent in current.Parents)
220
private static string GetIdentifierSymbolUsageLabel(
Symbol
symbol, ICollection<string>? aliasSet)
234
foreach (
var
argument in GetParameters(symbol))
Help\LocalizationResources.cs (1)
15
() => new ResourceManager("System.CommandLine.Properties.Resources", typeof(System.CommandLine.
Symbol
).Assembly));
System.CommandLine (46)
AliasSet.cs (2)
17
Symbol
.ThrowIfEmptyOrWithWhitespaces(alias, nameof(alias));
28
=> _aliases.Add(
Symbol
.ThrowIfEmptyOrWithWhitespaces(item, nameof(item)));
Argument.cs (2)
67
/// If <c>null</c>, the <see cref="
Symbol
.Name"/> of the argument will be used.
70
/// An argument with <see cref="
Symbol
.Name"/> of <c>argument</c> and a
ArgumentArity.cs (1)
147
var
parent = firstParent?.Symbol;
ChildSymbolList{T}.cs (1)
12
internal sealed class ChildSymbolList<T> : IList<T> where T :
Symbol
Command.cs (3)
44
public IEnumerable<
Symbol
> Children
94
/// <remarks>The collection does not contain the <see cref="
Symbol
.Name"/> of the Command.</remarks>
337
void AddCompletionsFor(
Symbol
identifier, AliasSet? aliases)
Help\HelpBuilder.cs (6)
18
private Dictionary<
Symbol
, Customization>? _customizationsBySymbol;
67
public void CustomizeSymbol(
Symbol
symbol,
102
Symbol
symbol,
398
Symbol
symbol,
489
Symbol
parent,
490
Symbol
parameter,
Help\HelpBuilder.Default.cs (7)
22
public static string GetArgumentDefaultValue(
Symbol
symbol)
46
public static bool ShouldShowDefaultValue(
Symbol
symbol) =>
68
public static string GetArgumentUsageLabel(
Symbol
parameter)
82
Symbol
symbol,
134
private static string GetIdentifierSymbolUsageLabel(
Symbol
symbol, ICollection<string>? aliasSet)
148
foreach (
var
argument in symbol.GetParameters())
251
foreach (
Symbol
parent in current.Parents)
Help\HelpBuilderExtensions.cs (2)
10
internal static IEnumerable<
Symbol
> GetParameters(this
Symbol
symbol)
Invocation\ParseErrorAction.cs (2)
120
IEnumerable<
Symbol
> candidates = targetSymbol.HasOptions || targetSymbol.HasSubcommands
122
: Enumerable.Empty<
Symbol
>();
Option.cs (3)
48
/// If <c>null</c>, the <see cref="
Symbol
.Name"/> of the option will be used,
52
/// An option with <see cref="
Symbol
.Name"/> of <c>--option</c> and a
124
/// <remarks>The collection does not contain the <see cref="
Symbol
.Name"/> of the Option.</remarks>
ParseResult.cs (2)
214
public SymbolResult? GetResult(
Symbol
symbol)
235
Symbol
currentSymbol = currentSymbolResult switch
Parsing\ParseOperation.cs (1)
449
var
symbol = kvp.Key;
Parsing\SymbolResult.cs (3)
94
/// Finds a result for a <see cref="
Symbol
" /> having the specified <paramref name="name" /> anywhere in the parse tree.
96
/// <param name="name">The name of the <see cref="
Symbol
" /> for which to find a result.</param>
98
/// A <see cref="SymbolResult" /> if the <see cref="
Symbol
" /> was matched by the parser or has a default value;
Parsing\SymbolResultTree.cs (3)
8
internal sealed class SymbolResultTree : Dictionary<
Symbol
, SymbolResult>
50
foreach (KeyValuePair<
Symbol
, SymbolResult> pair in this)
133
void AddToSymbolsByName(
Symbol
symbol, Command parent)
Parsing\Token.cs (3)
16
public Token(string? value, TokenType type,
Symbol
symbol)
24
internal Token(string? value, TokenType type,
Symbol
? symbol, int position)
49
internal
Symbol
? Symbol { get; set; }
RootCommand.cs (1)
46
/// (when available via assembly metadata), or <c>null</c> to fall back to <see cref="
Symbol
.Name"/>.
Symbol.cs (2)
35
internal void AddParent(
Symbol
symbol)
60
public IEnumerable<
Symbol
> Parents
SymbolNode.cs (2)
8
internal SymbolNode(
Symbol
symbol, Command? parent = null)
14
internal
Symbol
Symbol { get; }
System.CommandLine.StaticCompletions (5)
DynamicSymbolExtensions.cs (1)
17
private static readonly Dictionary<
Symbol
, bool> s_dynamicSymbols = [];
shells\PowershellShellProvider.cs (1)
84
private static string? SanitizeHelpDescription(
Symbol
s) => s.Description?.ReplaceLineEndings(" ").Replace("`", "``").Replace("'", "`'").Replace("\"", "`\"").Replace("$", "`$");
shells\ZshShellProvider.cs (3)
315
return ZshValueExpression(option as
Symbol
);
327
return ZshValueExpression(arg as
Symbol
);
331
private static string[]? ZshValueExpression(
Symbol
sym)