17 references to Argument
aspire (1)
Completions\CompletionInvocation.cs (1)
103if (parseResult.Tokens.Count > 0 && parseResult.Tokens[^1] is { Type: TokenType.Argument } lastToken)
dotnet-aot (5)
parent\dotnet\Extensions\ParseResultExtensions.cs (3)
52parseResult.GetResult(Parser.RootCommand.DotnetSubCommand) is { Tokens: [{ Type: TokenType.Argument, Value: { } } unmatchedCommandOrFile] } 72if (token.Type != TokenType.Argument || token != unmatchedCommandOrFile) 104token.Type == TokenType.Argument
parent\dotnet\Telemetry\AllowListToSendFirstArgument.cs (1)
29.Where(t => t.Type.Equals(TokenType.Argument)).FirstOrDefault()?.Value ?? null;
parent\dotnet\Telemetry\AllowListToSendVerbSecondVerbFirstArgument.cs (1)
26var firstArgument = parseResult.Tokens.FirstOrDefault(t => t.Type.Equals(TokenType.Argument))?.Value ?? "";
System.CommandLine (11)
Completions\CompletionContext.cs (1)
83lastToken?.Type == TokenType.Argument)
Parsing\ParseOperation.cs (4)
119(currentTokenType == TokenType.Argument || currentArgumentIndex > 0 || currentArgumentCount > 0)) 131else if (currentTokenType == TokenType.Argument) 153(currentTokenType == TokenType.Argument || 260while (More(out TokenType currentTokenType) && currentTokenType == TokenType.Argument)
Parsing\StringExtensions.cs (6)
181Token Argument(string value) => new(value, TokenType.Argument, default, i); 183Token CommandArgument(string value, Command command) => new(value, TokenType.Argument, command, i); 185Token OptionArgument(string value, Option option) => new(value, TokenType.Argument, option, i); 215tokenList.Add(new Token(alias.Slice(i + 1).ToString(), TokenType.Argument, default, argumentIndex)); 225tokenList.Add(new Token(alias.Slice(i).ToString(), TokenType.Argument, default, argumentIndex)); 240tokenList.Add(new Token(alias.Slice(index).ToString(), TokenType.Argument, default, argumentIndex));