315 references to Parse
Aspire.Cli.Tests (312)
Commands\AddCommandTests.cs (13)
26
var result = command.
Parse
("add --help");
91
var result = command.
Parse
("add");
166
var result = command.
Parse
("add docker");
249
var result = command.
Parse
("add docker --version 9.2.0");
330
var result = command.
Parse
("add red");
400
var result = command.
Parse
($"add redis --source {expectedSource}");
439
var result = command.
Parse
("add");
515
var result = command.
Parse
("add nonexistentpackage");
740
var result = command.
Parse
("add redis");
808
var result = command.
Parse
("add redis");
913
var result = command.
Parse
("add postgre");
998
var result = command.
Parse
("add sql");
1068
var result = command.
Parse
("add azureapp");
Commands\AgentMcpCommandTests.cs (1)
65
var parseResult = rootCommand.
Parse
("agent mcp");
Commands\BaseCommandTests.cs (1)
32
var result = command.
Parse
(args);
Commands\CacheCommandTests.cs (2)
21
var result = command.
Parse
("cache");
36
var result = command.
Parse
("cache --help");
Commands\CertificatesCommandTests.cs (3)
20
var result = command.
Parse
("certs --help");
35
var result = command.
Parse
("certs clean --help");
50
var result = command.
Parse
("certs trust --help");
Commands\ConfigCommandTests.cs (36)
37
var result = command.
Parse
("config");
51
var result = command.
Parse
("config");
65
var result = command.
Parse
("config set foo bar");
88
var result = command.
Parse
("config set foo.bar baz");
113
var result = command.
Parse
("config set foo.bar.baz hello");
143
var result1 = command.
Parse
("config set foo primitive");
148
var result2 = command.
Parse
("config set foo.bar nested");
173
var setResult = command1.
Parse
("config set testkey testvalue");
184
var getResult = command2.
Parse
("config get testkey");
199
var setResult = command1.
Parse
("config set level1.level2.level3 nestedvalue");
209
var getResult = command2.
Parse
("config get level1.level2.level3");
222
var result = command.
Parse
("config get nonexistent.key");
238
var setResult = command.
Parse
("config set deletekey deletevalue");
243
var deleteResult = command.
Parse
("config delete deletekey");
248
var getResult = command.
Parse
("config get deletekey");
263
var setResult = command.
Parse
("config set deep.nested.value test");
268
var deleteResult = command.
Parse
("config delete deep.nested.value");
292
var setResult1 = command.
Parse
("config set flatkey flatvalue");
296
var setResult2 = command.
Parse
("config set nested.key nestedvalue");
300
var setResult3 = command.
Parse
("config set deep.nested.key deepvalue");
305
var listResult = command.
Parse
("config list");
324
var setResult = command.
Parse
("config set testkey testvalue");
328
var listResult = command.
Parse
("config list");
350
var setResult = command.
Parse
("config set testkey testvalue");
354
var listResult = command.
Parse
("config list --all");
375
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature true");
393
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature false");
417
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.testFeature invalid");
450
var setResult = command.
Parse
($"config set {KnownFeatures.FeaturePrefix}.{KnownFeatures.ShowDeprecatedPackages} true");
483
var result = command.
Parse
("config set features:polyglotSupportEnabled true");
511
var result1 = command.
Parse
("config set features:polyglotSupportEnabled true");
516
var result2 = command.
Parse
("config set features.polyglotSupportEnabled false");
542
var result1 = command.
Parse
("config set features.polyglotSupportEnabled true");
547
var result2 = command.
Parse
("config set features:polyglotSupportEnabled false");
573
var setResult = command.
Parse
("config set features.polyglotSupportEnabled true");
578
var deleteResult = command.
Parse
("config delete features:polyglotSupportEnabled");
Commands\DeployCommandTests.cs (8)
27
var result = command.
Parse
("deploy --help");
58
var result = command.
Parse
("deploy --apphost invalid.csproj");
92
var result = command.
Parse
("deploy --apphost valid.csproj");
126
var result = command.
Parse
("deploy --apphost valid.csproj");
194
var result = command.
Parse
("deploy");
263
var result = command.
Parse
("deploy");
334
var result = command.
Parse
($"deploy --output-path {testOutputPath}");
394
var result = command.
Parse
("deploy");
Commands\DescribeCommandTests.cs (13)
25
var result = command.
Parse
("describe --help");
39
var result = command.
Parse
("describe");
58
var result = command.
Parse
($"describe --format {format} --help");
76
var result = command.
Parse
($"describe --format {format} --help");
91
var result = command.
Parse
("describe --format invalid");
106
var result = command.
Parse
("describe --follow --help");
121
var result = command.
Parse
("describe --watch --help");
136
var result = command.
Parse
("resources --help");
151
var result = command.
Parse
("describe --follow --format json --help");
166
var result = command.
Parse
("describe myresource --help");
181
var result = command.
Parse
("describe myresource --follow --format json --help");
272
var result = command.
Parse
("describe --follow --format json");
316
var result = command.
Parse
("describe --follow");
Commands\DoCommandTests.cs (6)
24
var result = command.
Parse
("do --help");
81
var result = command.
Parse
("do my-custom-step");
134
var result = command.
Parse
("do deploy");
187
var result = command.
Parse
("do publish");
245
var result = command.
Parse
("do my-step --output-path test-output");
277
var result = command.
Parse
("do my-step --apphost invalid.csproj");
Commands\DocsCommandTests.cs (9)
24
var result = command.
Parse
("docs");
42
var result = command.
Parse
("docs list");
59
var result = command.
Parse
("docs list --format json");
77
var result = command.
Parse
("docs search redis");
95
var result = command.
Parse
("docs search redis -n 3");
113
var result = command.
Parse
("docs search redis --format json");
130
var result = command.
Parse
("docs get redis-integration");
147
var result = command.
Parse
("docs get redis-integration --section \"Getting Started\"");
164
var result = command.
Parse
("docs get nonexistent-page");
Commands\DoctorCommandTests.cs (1)
20
var result = command.
Parse
("doctor --help");
Commands\ExecCommandTests.cs (7)
34
var result = command.
Parse
("exec --help");
52
var result = command.
Parse
("exec --resource api cmd");
70
var result = command.
Parse
("exec --resource api cmd");
88
var result = command.
Parse
("exec --resource api cmd");
109
var result = command.
Parse
("exec --help");
132
var result = command.
Parse
("exec --apphost test.csproj echo hello");
163
var result = command.
Parse
("exec --apphost test.csproj --resource myresource --command echo");
Commands\ExportCommandTests.cs (10)
61
var result = command.
Parse
($"export --output {outputPath}");
133
var result = command.
Parse
($"export --output {outputPath}");
166
var result = command.
Parse
($"export --apphost {appHostProjectPath} --output {outputPath}");
281
var result = command.
Parse
($"export --output {outputPath}");
344
var result = command.
Parse
($"export --output {outputPath}");
463
var result = command.
Parse
($"export redis --output {outputPath}");
522
var result = command.
Parse
($"export webfrontend --output {outputPath}");
583
var result = command.
Parse
($"export apiservice --output {outputPath}");
626
var result = command.
Parse
($"export nonexistent --output {outputPath}");
657
var result = command.
Parse
($"export --output {outputPath}");
Commands\ExtensionInternalCommandTests.cs (7)
36
var result = command.
Parse
("extension --help");
50
var result = command.
Parse
("extension");
71
var result = command.
Parse
("extension get-apphosts");
113
var result = command.
Parse
("extension get-apphosts");
152
var result = command.
Parse
("extension get-apphosts");
170
var result = command.
Parse
("extension get-apphosts");
184
var result = command.
Parse
("extension get-apphosts --help");
Commands\InitCommandTests.cs (7)
52
var parseResult = initCommand.
Parse
("init");
104
var parseResult = initCommand.
Parse
("init");
203
var parseResult = initCommand.
Parse
("init");
285
var parseResult = initCommand.
Parse
("init");
381
var parseResult = initCommand.
Parse
("init");
513
var result = command.
Parse
("init --channel stable");
538
var result = command.
Parse
("init --channel invalid-channel");
Commands\LogsCommandTests.cs (17)
24
var result = command.
Parse
("logs --help");
126
var result = command.
Parse
($"logs --tail {tailValue}");
147
var result = command.
Parse
($"logs --tail {tailValue} --help");
164
var result = command.
Parse
("logs myresource");
184
var result = command.
Parse
($"logs --format {format} --help");
202
var result = command.
Parse
($"logs --format {format} --help");
217
var result = command.
Parse
("logs --format invalid");
233
var result = command.
Parse
("logs --follow --tail 50 --help");
248
var result = command.
Parse
("logs myresource --follow --tail 100 --format json --help");
264
var result = command.
Parse
("logs -f -n 10 --help");
378
var result = command.
Parse
("logs --format json");
408
var result = command.
Parse
("logs");
435
var result = command.
Parse
($"logs {resourceName} --format json");
457
var result = command.
Parse
("logs --format json --timestamps");
495
var result = command.
Parse
("logs --format json");
534
var result = command.
Parse
("logs --timestamps");
556
var result = command.
Parse
("logs");
Commands\McpCommandTests.cs (7)
21
var result = command.
Parse
("mcp");
36
var result = command.
Parse
("mcp --help");
50
var result = command.
Parse
("mcp start --help");
108
var result = command.
Parse
("agent");
123
var result = command.
Parse
("agent --help");
137
var result = command.
Parse
("agent mcp --help");
151
var result = command.
Parse
("agent init --help");
Commands\NewCommandTests.cs (24)
36
var result = command.
Parse
("new --help");
106
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
163
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
216
var result = command.
Parse
("new aspire-starter --name MyApp --output . --use-redis-cache --test-framework None");
271
var result = command.
Parse
("new aspire-starter --output notsrc --use-redis-cache --test-framework None");
349
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
426
var result = command.
Parse
("new aspire-starter --channel stable --use-redis-cache --test-framework None");
484
var result = command.
Parse
("new aspire-starter --name MyApp --output . --use-redis-cache --test-framework None");
538
var result = command.
Parse
("new aspire-starter --name MyApp --output . --use-redis-cache --test-framework None --version 9.2.0");
569
var result = command.
Parse
("new");
625
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
678
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
758
var result = command.
Parse
("new aspire-starter --name TestApp --output .");
836
var result = command.
Parse
("new aspire-starter --use-redis-cache --test-framework None");
903
var result = command.
Parse
("new --name TestApp --output .");
977
var result = command.
Parse
("new --name TestApp --output .");
1014
var result = command.
Parse
("new aspire-empty --name TestApp --output . --localhost-tld false");
1075
var result = command.
Parse
("new aspire-empty --name TestApp --output .");
1126
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output . --localhost-tld false");
1183
var result = command.
Parse
("new aspire-ts-empty --name TestApp --localhost-tld false");
1278
var result = command.
Parse
("new aspire-ts-empty --name TestApp --output .");
1355
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output . --channel daily --localhost-tld false");
1419
var result = command.
Parse
("new aspire-ts-starter --name TestApp --output . --channel daily --localhost-tld false");
1465
var result = command.
Parse
("new aspire-empty --name TestApp --output .");
Commands\OptionWithLegacyTests.cs (2)
19
var result = command.
Parse
("test --new-name primary-value --old-name legacy-value");
34
var result = command.
Parse
("test --old-name legacy-value");
Commands\PsCommandTests.cs (10)
24
var result = command.
Parse
("ps --help");
39
var result = command.
Parse
("ps");
58
var result = command.
Parse
($"ps --format {format}");
76
var result = command.
Parse
($"ps --format {format}");
91
var result = command.
Parse
("ps --format invalid");
141
var result = command.
Parse
("ps --format json");
181
var result = command.
Parse
("ps --format json");
247
var result = command.
Parse
("ps --format json --resources");
309
var result = command.
Parse
("ps --format json");
363
var result = command.
Parse
("ps --resources");
Commands\PublishCommandPromptingIntegrationTests.cs (13)
49
var result = command.
Parse
("publish");
95
var result = command.
Parse
("publish");
147
var result = command.
Parse
("publish");
194
var result = command.
Parse
("publish");
240
var result = command.
Parse
("publish");
298
var result = command.
Parse
("publish");
377
var result = command.
Parse
("publish");
445
var result = command.
Parse
("publish");
497
var result = command.
Parse
("publish");
552
var result = command.
Parse
("publish");
623
var result = command.
Parse
("publish --debug");
667
var result = command.
Parse
("publish");
710
var result = command.
Parse
("publish");
Commands\PublishCommandTests.cs (6)
24
var result = command.
Parse
("publish --help");
52
var result = command.
Parse
("publish --apphost invalid.csproj");
83
var result = command.
Parse
("publish --apphost valid.csproj");
114
var result = command.
Parse
("publish --apphost valid.csproj");
157
var result = command.
Parse
("publish --apphost valid.csproj");
226
var result = command.
Parse
("publish");
Commands\ResourceCommandTests.cs (9)
21
var result = command.
Parse
("resource --help");
36
var result = command.
Parse
("resource");
51
var result = command.
Parse
("resource myresource");
66
var result = command.
Parse
("resource myresource my-command --help");
80
var result = command.
Parse
("resource myresource my-command --apphost /path/to/project.csproj --help");
96
var startResult = command.
Parse
("resource myresource start --help");
101
var stopResult = command.
Parse
("resource myresource stop --help");
106
var restartResult = command.
Parse
("resource myresource restart --help");
119
var result = command.
Parse
("resource myresource start --apphost /path/to/project.csproj --help");
Commands\RestoreCommandTests.cs (2)
39
var result = command.
Parse
($"restore --apphost {appHostFile.FullName}");
74
var result = command.
Parse
($"restore --apphost {appHostFile.FullName}");
Commands\RootCommandTests.cs (3)
23
var result = command.
Parse
("--help");
37
var result = command.
Parse
("--nologo --help");
71
var result = command.
Parse
("--help");
Commands\RunCommandTests.cs (21)
33
var result = command.
Parse
("run --help");
50
var result = command.
Parse
("run");
67
var result = command.
Parse
("run");
84
var result = command.
Parse
("run --apphost /tmp/doesnotexist.csproj");
105
var result = command.
Parse
("run --detach");
126
var result = command.
Parse
("run");
206
var result = command.
Parse
("run");
326
var result = command.
Parse
("run");
381
var result = command.
Parse
("run");
451
var result = command.
Parse
("run");
545
var result = command.
Parse
("run");
615
var result = command.
Parse
("run");
685
var result = command.
Parse
("run --start-debug-session");
747
var result = command.
Parse
("run");
806
var result = command.
Parse
("run");
865
var result = command.
Parse
("run");
924
var result = command.
Parse
("run");
1329
var result = command.
Parse
("run --no-build");
1401
var result = command.
Parse
("run --isolated");
1462
var result = command.
Parse
("run --no-build");
1478
var result = command.
Parse
("run -- --custom-arg value");
Commands\SdkCommandTests.cs (2)
21
var result = command.
Parse
("sdk");
36
var result = command.
Parse
("sdk --help");
Commands\SdkDumpCommandTests.cs (11)
27
var result = command.
Parse
("sdk dump --help");
49
var result = command.
Parse
($"sdk dump --format {format}");
62
var result = command.
Parse
("sdk dump /nonexistent/path/to/integration.csproj");
77
var result = command.
Parse
("sdk dump @13.2.0");
92
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@");
107
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@not-a-version!!!");
122
var result = command.
Parse
("sdk dump some-random-string");
137
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0");
150
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0 Aspire.Hosting.PostgreSQL@13.2.0");
163
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@13.2.0-preview.1");
178
var result = command.
Parse
("sdk dump Aspire.Hosting.Redis@@13.2.0");
Commands\SdkInstallerTests.cs (7)
46
var result = command.
Parse
("run");
71
var result = command.
Parse
("add");
94
var result = command.
Parse
("new aspire-starter");
133
var result = command.
Parse
("publish");
171
var result = command.
Parse
("deploy");
194
var result = command.
Parse
("exec");
216
var result = command.
Parse
("run");
Commands\SecretCommandTests.cs (2)
33
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
57
var result = command.
Parse
($"secret path --apphost \"{appHostFile.FullName}\"");
Commands\StartCommandTests.cs (5)
21
var result = command.
Parse
("start --help");
36
var result = command.
Parse
("start --no-build --help");
50
var result = command.
Parse
("start --format json --help");
64
var result = command.
Parse
("start --isolated --help");
78
var result = command.
Parse
("start -- --custom-arg value");
Commands\StopCommandTests.cs (2)
21
var result = command.
Parse
("stop --help");
36
var result = command.
Parse
("stop myresource");
Commands\TelemetryCommandTests.cs (1)
24
var result = command.
Parse
("otel");
Commands\TelemetryLogsCommandTests.cs (4)
25
var result = command.
Parse
("otel logs");
43
var result = command.
Parse
($"telemetry logs --limit {limitValue}");
69
var result = command.
Parse
("otel logs");
104
var result = command.
Parse
("otel logs");
Commands\TelemetrySpansCommandTests.cs (4)
25
var result = command.
Parse
("otel spans");
43
var result = command.
Parse
($"telemetry spans --limit {limitValue}");
69
var result = command.
Parse
("otel spans");
104
var result = command.
Parse
("otel spans");
Commands\TelemetryTracesCommandTests.cs (4)
25
var result = command.
Parse
("otel traces");
43
var result = command.
Parse
($"telemetry traces --limit {limitValue}");
69
var result = command.
Parse
("otel traces");
120
var result = command.
Parse
("otel traces");
Commands\UpdateCommandTests.cs (18)
32
var result = command.
Parse
("update --help");
73
var result = command.
Parse
($"update --apphost AppHost.csproj");
202
var result = command.
Parse
("update");
275
var result = command.
Parse
("update --apphost AppHost.csproj");
346
var result = command.
Parse
("update --apphost AppHost.csproj");
393
var result = command.
Parse
("update --self --channel daily");
440
var result = command.
Parse
("update --self --quality daily");
481
var result = command.
Parse
("update --self --channel daily");
546
var result = command.
Parse
("update --channel daily");
613
var result = command.
Parse
("update --quality daily");
667
var result = command.
Parse
("update --quality invalid");
735
var result = command.
Parse
("update --channel stable --quality daily");
795
var result = command.
Parse
("update");
857
var result = command.
Parse
("update");
899
var result = command.
Parse
("update --self");
940
var result = command.
Parse
("update --self");
985
var result = command.
Parse
("update --self");
1019
var result = command.
Parse
("update --self --channel stable");
Commands\WaitCommandTests.cs (14)
23
var result = command.
Parse
("wait --help");
38
var result = command.
Parse
("wait");
53
var result = command.
Parse
("wait myresource --help");
67
var result = command.
Parse
("wait myresource --apphost /path/to/project.csproj --help");
81
var result = command.
Parse
("wait myresource --status up --help");
95
var result = command.
Parse
("wait myresource --timeout 60 --help");
112
var result = command.
Parse
($"wait myresource --status {status} --help");
129
var result = command.
Parse
($"wait myresource --status {status} --help");
159
var result = command.
Parse
("wait nonexistent --timeout 5");
184
var result = command.
Parse
("wait myapp --status up --timeout 5");
209
var result = command.
Parse
("wait mydb --status healthy --timeout 5");
239
var result = command.
Parse
("wait mydb --status healthy --timeout 2");
264
var result = command.
Parse
("wait worker --status down --timeout 5");
294
var result = command.
Parse
("wait myapp --status up --timeout 5");
dotnet (1)
Parser.cs (1)
252
public static ParseResult Parse(string commandLineUnsplit) => RootCommand.
Parse
(commandLineUnsplit, ParserConfiguration);
Microsoft.TemplateEngine.Cli (1)
Commands\create\InstantiateCommand.TabCompletion.cs (1)
67
ParseResult parseResult = parser.
Parse
(context.CommandLineText, ParserFactory.ParserConfiguration);
System.CommandLine (1)
Completions\CompletionAction.cs (1)
29
var completionParseResult = parseResult.RootCommandResult.Command.
Parse
(commandLineToComplete, parseResult.Configuration);