14 references to RootCommand
dotnet (14)
Extensions\ParseResultExtensions.cs (8)
24parseResult.CommandResult.Command.Equals(Parser.RootCommand) && string.IsNullOrEmpty(parseResult.RootSubCommandResult()); 38parseResult.CommandResult.Command.Equals(Parser.RootCommand) 39&& !string.IsNullOrEmpty(parseResult.GetValue(Parser.RootCommand.DotnetSubCommand)); 52parseResult.GetResult(Parser.RootCommand.DotnetSubCommand) is { Tokens: [{ Type: TokenType.Argument, Value: { } } unmatchedCommandOrFile] } 85_ => parseResult.GetResult(Parser.RootCommand.DotnetSubCommand)?.GetValueOrDefault<string>() 126.SkipWhile(arg => Parser.RootCommand.DiagOption.Name.Equals(arg) 127|| Parser.RootCommand.DiagOption.Aliases.Contains(arg) 137|| (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 302RootCommand.Subcommands.FirstOrDefault(c => c.Name.Equals(commandName, StringComparison.OrdinalIgnoreCase)); 351public static ParseResult Parse(string commandLineUnsplit) => RootCommand.Parse(commandLineUnsplit, ParserConfiguration); 352public static ParseResult Parse(string[] args) => RootCommand.Parse(args, ParserConfiguration); 448if (command.Equals(RootCommand))
Program.cs (1)
176string commandName = "dotnet-" + parseResult.GetValue(Parser.RootCommand.DotnetSubCommand);