33 references to Parser
dotnet (33)
Commands\Build\BuildCommand.cs (1)
16var parseResult = Parser.Parse(["dotnet", "build", .. args]);
Commands\Clean\CleanCommand.cs (1)
16var result = Parser.Parse(["dotnet", "clean", .. args]);
Commands\DotNetCommandFactory.cs (2)
39var command = Parser.GetBuiltInCommand(commandName); 42commandFunc = (args) => Parser.Invoke([commandName, .. args]);
Commands\Help\HelpCommand.cs (1)
108var parsedCommand = Parser.Parse(["dotnet", .. command]);
Commands\Hidden\Complete\CompleteCommand.cs (2)
22var result = Parser.Parse(["dotnet", "complete", .. args]); 64var result = Parser.Parse(input);
Commands\Hidden\InternalReportInstallSuccess\InternalReportInstallSuccessCommand.cs (1)
22var result = Parser.Parse(["dotnet", "internal-reportinstallsuccess", .. args]);
Commands\Hidden\Parse\ParseCommand.cs (1)
19var reparsed = Parser.Parse(tokens);
Commands\MSBuild\MSBuildCommand.cs (1)
28var result = Parser.Parse(["dotnet", "msbuild", .. args]);
Commands\Pack\PackCommand.cs (1)
28var parseResult = Parser.Parse(["dotnet", "pack", .. args]);
Commands\Publish\PublishCommand.cs (1)
27var parseResult = Parser.Parse(["dotnet", "publish", .. args]);
Commands\Restore\RestoreCommand.cs (1)
16var result = Parser.Parse(["dotnet", "restore", .. args]);
Commands\Run\RunCommand.cs (2)
813var parseResult = Parser.Parse(["dotnet", "run", .. args]); 1028var newParseResult = Parser.Parse(tokensToParse);
Commands\Test\VSTest\TestCommand.cs (1)
182var parseResult = Parser.Parse(["dotnet", "test", .. args]);
Commands\Tool\Store\StoreCommand.cs (1)
23var result = Parser.Parse(["dotnet", "store", .. args]);
Extensions\ParseResultExtensions.cs (11)
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>() 110Parser.Parse([.. filteredTokenValues, "-h"]).Invoke(); 128.SkipWhile(arg => Parser.RootCommand.DiagOption.Name.Equals(arg) 129|| Parser.RootCommand.DiagOption.Aliases.Contains(arg) 137Parser.GetBuiltInCommand(parseResult.RootSubCommandResult()) != null 139|| (parseResult.IsTopLevelDotnetCommand() && string.IsNullOrEmpty(parseResult.GetValue(Parser.RootCommand.DotnetSubCommand))); 143|| Parser.GetBuiltInCommand(parseResult.RootSubCommandResult()) != null;
Program.cs (5)
183parseResult = Parser.Parse(args); 281exitCode = Parser.Invoke(parseResult); 289exitCode = Parser.ExceptionHandler(exception, parseResult); 312string commandName = "dotnet-" + parseResult.GetValue(Parser.RootCommand.DotnetSubCommand); 348parseResult = Parser.Parse(["run", "--file", unmatchedCommandOrFile.Value, .. otherTokens]);