94 references to Parse
aspire (6)
Commands\AgentTelemetryCommand.cs (1)
131await RecordAsync(Parse(args[2..])).ConfigureAwait(false);
Commands\ResourceCommand.cs (1)
315var parseResult = parserCommand.Parse(capturedArguments);
Completions\CompletionInvocation.cs (1)
76return WriteCompletions(GetTokenCompletions(command.Parse(tokens)), output);
Profiling\ProfileCaptureOptions.cs (1)
53var parseResult = bootstrapCommand.Parse([.. args]);
Program.cs (2)
1117parseResult = app.Services.GetRequiredService<RootCommand>().Parse(args); 1398return await command.Parse(args).InvokeAsync(new InvocationConfiguration
Aspire.Cli.Tests (59)
Commands\AgentTelemetryCommandTests.cs (6)
35var result = provider.GetRequiredService<RootCommand>().Parse(["agent", "telemetry", "--hook"]); 71var result = provider.GetRequiredService<RootCommand>().Parse(["agent", "telemetry", "--hook"]); 111var result = provider.GetRequiredService<RootCommand>().Parse(args); 136var command = provider.GetRequiredService<RootCommand>().Parse(["doctor"]).CommandResult.Command; 263var result = command.Parse(["agent", "telemetry", "--event-type", "reference_file_read", "--file-reference", fileReference]); 318var result = command.Parse(["agent", "telemetry", "--event-type", "not_a_real_event", "--skill-name", "bad name", "--file-reference", "/etc/passwd"]);
Commands\CompletionsCommandTests.cs (4)
33var result = await command.Parse(["completions", "script", shell]) 98Assert.NotEmpty(command.Parse(["--start-debug-session", "run"]).Errors); 112var result = await command.Parse(["completions", "script", shell]) 373var expectedExitCode = await command.Parse(args).InvokeAsync(new InvocationConfiguration { Output = expected, Error = error }).DefaultTimeout();
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)
710var result = command.Parse(["resource", "web-browser-automation", "click-browser", """{"selector":"#submit"}"""]);
Commands\RootCommandTests.cs (1)
258var result = command.Parse(
Commands\RunCommandTests.cs (13)
68var result = command.Parse(["run", optionName, "E2E"]); 100var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 142var result = command.Parse(["run", "--detach", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 193var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "missing"]); 238var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "container"]); 274var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 1606var result = command.Parse( 5059var result = command.Parse( 5122var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--debug", "--", "--custom-arg", "value"]); 5150var result = command.Parse(["run", "--apphost", appHostFile.FullName, "--debug", "--secret", "value"]); 5160var childParseResult = command.Parse(["run", .. options.Args]); 5415var result = command.Parse(args); 5467var childParseResult = command.Parse(forwardedArguments);
Commands\SdkDumpCommandTests.cs (1)
276var result = command.Parse(["sdk", "dump", "--format", "ci", outputOption,
Commands\StartCommandTests.cs (5)
115var result = command.Parse(["start", optionName, "E2E"]); 154var result = command.Parse(["start", "--apphost", appHostFile.FullName, "--launch-profile", "E2E"]); 246var result = command.Parse( 402var result = command.Parse( 701var childParseResult = command.Parse(forwardedArguments);
Commands\TerminalTapePlayCommandTests.cs (6)
62var result = provider.GetRequiredService<RootCommand>().Parse( 86var result = provider.GetRequiredService<RootCommand>().Parse( 145var result = provider.GetRequiredService<RootCommand>().Parse( 317var result = provider.GetRequiredService<RootCommand>().Parse( 347var result = provider.GetRequiredService<RootCommand>().Parse( 372var result = provider.GetRequiredService<RootCommand>().Parse(
Commands\UpdateCommandRepositoryToolsTests.cs (1)
316.Parse(["update", "--apphost", appHost, "--channel", "stable", "--yes", "--non-interactive"])
Projects\DotNetAppHostProjectTests.cs (1)
1146var parseResult = rootCommand.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);
CreateLayout (1)
Program.cs (1)
106return await rootCommand.Parse(args).InvokeAsync().ConfigureAwait(false);
crossgen2 (1)
Program.cs (1)
1015.Parse(args, new()
dotnet-aot (1)
parent\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)
70var parseResult = definition.Parse(args, ParserConfiguration); 90parseResult = definition.Parse(args, ParserConfiguration);
Program.cs (1)
161var runParseResult = runCommandDefinition.Parse(options.CommandArgumentsForFileDiscovery, CommandLineOptions.ParserConfiguration);
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
260return rootCommand.Parse(args).InvokeAsync(null, CancellationToken.None);
ilasm (1)
Program.cs (1)
303.Parse(normalizedArgs)
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)
170ParseResult parseResult = rootCommand.Parse(args);
SelectTests (1)
Program.cs (1)
120return 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();