14 references to RootCommand
dotnet (14)
Extensions\ParseResultExtensions.cs (8)
23parseResult.CommandResult.Command.Equals(Parser.RootCommand) && string.IsNullOrEmpty(parseResult.RootSubCommandResult()); 37parseResult.CommandResult.Command.Equals(Parser.RootCommand) 38&& !string.IsNullOrEmpty(parseResult.GetValue(Parser.RootCommand.DotnetSubCommand)); 51parseResult.GetResult(Parser.RootCommand.DotnetSubCommand) is { Tokens: [{ Type: TokenType.Argument, Value: { } } unmatchedCommandOrFile] } 87_ => parseResult.GetResult(Parser.RootCommand.DotnetSubCommand)?.GetValueOrDefault<string>() 128.SkipWhile(arg => Parser.RootCommand.DiagOption.Name.Equals(arg) 129|| Parser.RootCommand.DiagOption.Aliases.Contains(arg) 139|| (parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(Parser.RootCommand.DotnetSubCommand)));
Parser.cs (5)
111/// <see cref="RootCommand"/>: the SDK defines its own <c>--version</c> option, so the built-in 248RootCommand.Subcommands.FirstOrDefault(c => c.Name.Equals(commandName, StringComparison.OrdinalIgnoreCase)); 297public static ParseResult Parse(string commandLineUnsplit) => RootCommand.Parse(commandLineUnsplit, ParserConfiguration); 298public static ParseResult Parse(string[] args) => RootCommand.Parse(args, ParserConfiguration); 394if (command.Equals(RootCommand))
Program.cs (1)
312string commandName = "dotnet-" + parseResult.GetValue(Parser.RootCommand.DotnetSubCommand);