4 types derived from Symbol
System.CommandLine (4)
Argument.cs (1)
15public abstract class Argument : Symbol
Command.cs (1)
25public class Command : Symbol, IEnumerable
Directive.cs (1)
21public class Directive : Symbol
Option.cs (1)
15public abstract class Option : Symbol
70 references to Symbol
Microsoft.DotNet.Cli.CommandLine (3)
ForwardedOptionExtensions.cs (1)
16private static readonly Dictionary<Symbol, Func<ParseResult, IEnumerable<string>>> s_forwardingFunctions = [];
SymbolDocumentationExtensions.cs (2)
13private static readonly Dictionary<Symbol, string> s_documentationLinks = new(); 16extension(Symbol symbol)
Microsoft.DotNet.Cli.Definitions (16)
Help\HelpBuilder.cs (9)
15private Dictionary<Symbol, Customization>? _customizationsBySymbol; 63Symbol symbol, 98Symbol symbol, 176Symbol symbol, 244string GetSymbolDefaultValue(Symbol symbol) 261private static IEnumerable<Symbol> GetParameters(Symbol symbol) 503Symbol parent, 504Symbol parameter,
Help\HelpBuilder.Default.cs (6)
22public static string GetArgumentDefaultValue(Symbol parameter) 48public static string GetArgumentUsageLabel(Symbol parameter) 58static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, Symbol symbol, ArgumentArity arity) 179foreach (Symbol parent in current.Parents) 220private static string GetIdentifierSymbolUsageLabel(Symbol symbol, ICollection<string>? aliasSet) 234foreach (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)
17Symbol.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)
147var parent = firstParent?.Symbol;
ChildSymbolList{T}.cs (1)
12internal sealed class ChildSymbolList<T> : IList<T> where T : Symbol
Command.cs (3)
44public IEnumerable<Symbol> Children 94/// <remarks>The collection does not contain the <see cref="Symbol.Name"/> of the Command.</remarks> 337void AddCompletionsFor(Symbol identifier, AliasSet? aliases)
Help\HelpBuilder.cs (6)
18private Dictionary<Symbol, Customization>? _customizationsBySymbol; 67public void CustomizeSymbol(Symbol symbol, 102Symbol symbol, 398Symbol symbol, 489Symbol parent, 490Symbol parameter,
Help\HelpBuilder.Default.cs (7)
22public static string GetArgumentDefaultValue(Symbol symbol) 46public static bool ShouldShowDefaultValue(Symbol symbol) => 68public static string GetArgumentUsageLabel(Symbol parameter) 82Symbol symbol, 134private static string GetIdentifierSymbolUsageLabel(Symbol symbol, ICollection<string>? aliasSet) 148foreach (var argument in symbol.GetParameters()) 251foreach (Symbol parent in current.Parents)
Help\HelpBuilderExtensions.cs (2)
10internal static IEnumerable<Symbol> GetParameters(this Symbol symbol)
Invocation\ParseErrorAction.cs (2)
120IEnumerable<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)
214public SymbolResult? GetResult(Symbol symbol) 235Symbol currentSymbol = currentSymbolResult switch
Parsing\ParseOperation.cs (1)
449var 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)
8internal sealed class SymbolResultTree : Dictionary<Symbol, SymbolResult> 50foreach (KeyValuePair<Symbol, SymbolResult> pair in this) 133void AddToSymbolsByName(Symbol symbol, Command parent)
Parsing\Token.cs (3)
16public Token(string? value, TokenType type, Symbol symbol) 24internal Token(string? value, TokenType type, Symbol? symbol, int position) 49internal 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)
35internal void AddParent(Symbol symbol) 60public IEnumerable<Symbol> Parents
SymbolNode.cs (2)
8internal SymbolNode(Symbol symbol, Command? parent = null) 14internal Symbol Symbol { get; }
System.CommandLine.StaticCompletions (5)
DynamicSymbolExtensions.cs (1)
17private static readonly Dictionary<Symbol, bool> s_dynamicSymbols = [];
shells\PowershellShellProvider.cs (1)
84private static string? SanitizeHelpDescription(Symbol s) => s.Description?.ReplaceLineEndings(" ").Replace("`", "``").Replace("'", "`'").Replace("\"", "`\"").Replace("$", "`$");
shells\ZshShellProvider.cs (3)
315return ZshValueExpression(option as Symbol); 327return ZshValueExpression(arg as Symbol); 331private static string[]? ZshValueExpression(Symbol sym)