90 references to Parse
aspire (3)
Commands\ResourceCommand.cs (1)
314var parseResult = parserCommand.Parse(capturedArguments);
Profiling\ProfileCaptureOptions.cs (1)
53var parseResult = bootstrapCommand.Parse([.. args]);
Program.cs (1)
1155var parseResult = rootCommand.Parse(args);
aspire-managed (1)
Program.cs (1)
82return await rootCommand.Parse(args).InvokeAsync(cancellationToken: operationCts.Token).ConfigureAwait(false);
Aspire.Cli.Tests (43)
Commands\AgentTelemetryCommandTests.cs (2)
125var result = command.Parse(["agent", "telemetry", "--event-type", "reference_file_read", "--file-reference", fileReference]); 180var result = command.Parse(["agent", "telemetry", "--event-type", "not_a_real_event", "--skill-name", "bad name", "--file-reference", "/etc/passwd"]);
Commands\ParseResultHelperTests.cs (20)
101var parseResult = _command.Parse(commandLine); 114var parseResult = _command.Parse(["run", "--capture-profile-output", relativePath]); 126var parseResult = _command.Parse(["run", "--capture-profile-output", ""]); 138var parseResult = _command.Parse(["run", "--capture-profile-output=--"]); 153var parseResult = command.Parse(["test", "--value=--"]); 175var parentParseResult = command.Parse(["test", "--values=--flag"]); 183var childParseResult = command.Parse(["test", .. forwardedArguments.Tokens]); 194var parseResult = _command.Parse(["run", "-d", "--isolated"]); 208var parseResult = _command.Parse( 219var childParseResult = _command.Parse(["run", .. forwardedArguments.Tokens]); 233var parseResult = _command.Parse(["run", "--debug", "--secret", "value"]); 243var childParseResult = _command.Parse(["run", .. forwardedArguments.Tokens]); 255var parseResult = _command.Parse(["run", "--ApiKey", "sk-live-secret"]); 266var parseResult = _command.Parse(["run", "--debug", "--secret", "value"]); 276var parseResult = _command.Parse(["run", "--", "--ApiKey", "secret"]); 286var parseResult = _command.Parse(["add", "Aspire.Hosting.Redis"]); 294var parseResult = _command.Parse(["run", "--apphost", "path/to/App.csproj"]); 302Assert.Equal(string.Empty, ParseResultHelper.GetLoggableArguments(_command.Parse([]))); 306Assert.Equal(string.Empty, ParseResultHelper.GetLoggableArguments(_command.Parse([_command.Name]))); 312var parseResult = _command.Parse(["run", "--apphost", "same-value", "--", "same-value"]);
Commands\ResourceCommandTests.cs (1)
712var result = command.Parse(["resource", "web-browser-automation", "click-browser", """{"selector":"#submit"}"""]);
Commands\RootCommandTests.cs (1)
258var result = command.Parse(
Commands\RunCommandTests.cs (13)
66var result = command.Parse(["run", optionName, "E2E"]); 98var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 140var result = command.Parse(["run", "--detach", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 191var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "missing"]); 236var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "container"]); 272var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 1189var result = command.Parse( 4379var result = command.Parse( 4442var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--debug", "--", "--custom-arg", "value"]); 4470var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--debug", "--secret", "value"]); 4480var childParseResult = command.Parse(["run", .. options.Args]); 4735var result = command.Parse(args); 4787var childParseResult = command.Parse(forwardedArguments);
Commands\StartCommandTests.cs (5)
114var result = command.Parse(["start", optionName, "E2E"]); 153var result = command.Parse(["start", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 245var result = command.Parse( 401var result = command.Parse( 700var childParseResult = command.Parse(forwardedArguments);
Projects\DotNetAppHostProjectTests.cs (1)
1117var parseResult = rootCommand.Parse(
Aspire.Hosting.RemoteHost.Tests (8)
LayoutCommandTests.cs (6)
39var parseResult = command.Parse([ 89var parseResult = command.Parse([ 127var parseResult = command.Parse([ 172var parseResult = command.Parse([ 230var restoreParseResult = restoreCommand.Parse([ 246var manifestParseResult = manifestCommand.Parse([
RestoreCommandTests.cs (2)
31var parseResult = command.Parse([ 47var manifestParseResult = manifestCommand.Parse([
Aspire.Managed.Tests (3)
NuGet\RestoreCommandTests.cs (3)
42await command.Parse(["--package", "Fake.Package,1.0.0", "--no-nuget-org", "--output", outputDir, "--working-dir", tempDirPath]).InvokeAsync(); 65await command.Parse(["--package", "Fake.Package,1.0.0", "--no-nuget-org", "--output", outputDir, "--working-dir", tempDirPath]).InvokeAsync(); 100await command.Parse([
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
72return rootCommand.Parse(args).Invoke();
Aspire.TerminalHost (1)
TerminalHostArgs.cs (1)
113var parseResult = command.Parse(args);
cdac-build-tool (1)
Program.cs (1)
18return await rootCommand.Parse(args).InvokeAsync().ConfigureAwait(true);
ConfigurationSchemaGenerator (1)
Program.cs (1)
14return await rootCommand.Parse(args).InvokeAsync().ConfigureAwait(false);
crossgen2 (1)
Program.cs (1)
989.Parse(args, new()
dotnet (4)
Commands\New\DotnetCommandCallbacks.cs (3)
30var addPackageReferenceCommand = new PackageAddCommand(addCommand.Parse([.. commandArgs])); 43var addProjectReferenceCommand = new ReferenceAddCommand(addCommand.Parse([.. commandArgs])); 72var addProjectToSolutionCommand = new SolutionAddCommand(solutionCommand.Parse([.. commandArgs]));
Parser.cs (1)
356public static ParseResult Parse(string[] args) => RootCommand.Parse(args, ParserConfiguration);
dotnet-aot (1)
src\sdk\src\Cli\dotnet\Parser.cs (1)
356public static ParseResult Parse(string[] args) => RootCommand.Parse(args, ParserConfiguration);
dotnet-format (1)
Program.cs (1)
13return await rootCommand.Parse(args).InvokeAsync(null, CancellationToken.None);
dotnet-sourcelink (1)
dotnet-suggest (1)
SuggestionDispatcher.cs (1)
106public Task<int> InvokeAsync(string[] args) => RootCommand.Parse(args).InvokeAsync(Configuration);
dotnet-watch (3)
CommandLine\CommandLineOptions.cs (2)
69var parseResult = definition.Parse(args, ParserConfiguration); 89parseResult = definition.Parse(args, ParserConfiguration);
Program.cs (1)
160var runParseResult = runCommandDefinition.Parse(options.CommandArgumentsWithoutBinLog, CommandLineOptions.ParserConfiguration);
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
260return rootCommand.Parse(args).InvokeAsync(null, CancellationToken.None);
ilasm (1)
Program.cs (1)
295.Parse(args)
ilc (1)
Program.cs (1)
845.Parse(args, new()
Microsoft.DotNet.Cli.Definitions (1)
Help\HelpContext.cs (1)
21private static readonly Lazy<ParseResult> EmptyParseResult = new(() => new RootCommand().Parse(Array.Empty<string>()));
Microsoft.DotNet.Cli.Utils (1)
MSBuildArgs.cs (1)
111var parseResult = fakeCommand.Parse([.. forwardedAndUserFacingArgs], _analysisParsingConfiguration);
Microsoft.DotNet.MacOsPkg.Cli (1)
Program.cs (1)
31return rootCommand.Parse(args).Invoke();
Microsoft.DotNet.VersionTools.Cli (1)
Program.cs (1)
62return rootCommand.Parse(args).Invoke();
Microsoft.NET.Sdk.BlazorWebAssembly.Tool (1)
Program.cs (1)
66return rootCommand.Parse(args).Invoke();
Microsoft.NET.Sdk.StaticWebAssets.Tool (1)
Program.cs (1)
66return rootCommand.Parse(args).Invoke();
Microsoft.TemplateEngine.Cli (3)
Commands\create\InstantiateCommand.cs (2)
252ParseResult updatedParseResult = args.ParseResult.RootCommandResult.Command.Parse( 415ParseResult parseResult = parser.Parse(args.RemainingArguments ?? Array.Empty<string>(), ParserFactory.ParserConfiguration);
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
188ParseResult result = ParserFactory.CreateParser(reparseCommand).Parse(args.RemainingArguments ?? Array.Empty<string>());
NuGet.CommandLine.XPlat (1)
Program.cs (1)
168ParseResult parseResult = rootCommand.Parse(args);
SelectTests (1)
Program.cs (1)
114return rootCommand.Parse(args).Invoke();
System.CommandLine (1)
ParseResult.cs (1)
62internal static ParseResult Empty() => new RootCommand().Parse(Array.Empty<string>());
TypeScriptApiCompat (1)
Program.cs (1)
68return rootCommand.Parse(args).Invoke();