294 writes to Name
Aspire.Cli.Tests (294)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (1)
242
Name
= "api",
Backchannel\ResourceSnapshotMapperTests.cs (26)
56
Name
= "mauiapp-android-emulator",
88
Name
= "frontend",
184
Name
= "frontend",
208
Name
= "frontend",
234
Name
= "parameter",
262
Name
= "parameter",
289
Name
= "frontend",
332
Name
= "frontend",
361
Name
= "messaging-abcxyz",
369
Name
= "frontend",
387
Name
= "frontend",
419
Name
= "messaging-abcxyz",
426
Name
= "messaging-defuvw",
434
Name
= "frontend",
452
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
453
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
467
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
468
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
482
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
483
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
484
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
497
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
498
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
499
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
513
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }
526
new() {
Name
= "Cache-Zuyppzgw", DisplayName = "Cache", ResourceType = "Container", State = "Running" }
Backchannel\ResourceSnapshotWatcherTests.cs (12)
201
Name
= "api",
213
Name
= "api",
246
Name
= "api",
259
Name
= "api",
293
Name
= "api",
306
Name
= "api",
340
Name
= "api",
352
Name
= "api",
362
Name
= "api",
487
Name
= $"resource-{resourceIndex}",
558
Name
= "resource-0",
584
Name
= $"resource-{resourceIndex}",
Backchannel\TrayResourceHealthTests.cs (13)
36
Name
= "resource",
55
Name
= "api",
73
new() {
Name
= "hidden-state", State = "Hidden", HealthStatus = "Unhealthy" },
74
new() {
Name
= "hidden-flag", State = "FailedToStart", IsHidden = true },
75
new() {
Name
= "parameter", ResourceType = "Parameter", State = "Active" },
76
new() {
Name
= "connection", ResourceType = "ConnectionString" },
77
new() {
Name
= "setup", State = "Finished", ExitCode = 0 }
83
[.. resources, new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }]));
91
new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" },
95
Name
= "generator", State = "NotStarted", HealthStatus = "Unhealthy",
111
new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" },
112
new() {
Name
= "worker", State = "Waiting" },
113
new() {
Name
= "database", State = "Running", HealthStatus = "Unhealthy" }
Backchannel\TrayWatchStreamTests.cs (17)
732
new() {
Name
= "api", State = "Starting", Version = 1 },
733
new() {
Name
= "cache", State = "Running", HealthStatus = "Healthy", Version = 1 }
758
resourceUpdates.Writer.TryWrite(new() {
Name
= "api", State = "Running", HealthStatus = "Healthy", Version = 2 });
761
resourceUpdates.Writer.TryWrite(new() {
Name
= "cache", State = "Running", HealthStatus = "Degraded", Version = 2 });
764
resourceUpdates.Writer.TryWrite(new() {
Name
= "cache", State = "Running", HealthStatus = "Unhealthy", Version = 3 });
767
resourceUpdates.Writer.TryWrite(new() {
Name
= "cache", State = "Running", HealthStatus = "Healthy", Version = 4 });
770
resourceUpdates.Writer.TryWrite(new() {
Name
= "api", State = "Running", HealthStatus = "Unhealthy", Version = 1 });
771
resourceUpdates.Writer.TryWrite(new() {
Name
= "cache", State = "FailedToStart", Version = 5 });
774
resourceUpdates.Writer.TryWrite(new() {
Name
= "cache", State = "FailedToStart", IsHidden = true, Version = 6 });
825
? [new() {
Name
= "api", State = "Running", IsHidden = true }]
842
resourceUpdates.Writer.TryWrite(new() {
Name
= "api", State = "Running" });
845
resourceUpdates.Writer.TryWrite(new() {
Name
= "api", State = "Running", IsHidden = true });
874
connection.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
915
initial.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
918
replacement.ResourceSnapshots = [new() {
Name
= "api", State = "Waiting" }];
981
initial.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
984
replacement.ResourceSnapshots = [new() {
Name
= "api", State = "Waiting" }];
Commands\AgentMcpCommandTests.cs (14)
239
Name
= "test-resource-abcd1234",
303
Name
= "annotated-resource-runtime",
380
Name
= "my-resource-abcd1234",
513
Name
= "db1-mcp-ypnvhwvw",
664
Name
= "unrelated-db-xyz",
709
Name
= "pinned-db-xyz",
806
Name
= "unrelated",
835
Name
= "api",
927
Name
= "pinned-db-xyz",
1125
Name
= "pinned-db-xyz",
1206
Name
= "db-mcp-abcd1234",
1408
Name
= "db-mcp-xyz",
1837
Name
= $"{displayName}-runtime",
1952
Name
= "contract-resource-runtime",
Commands\DescribeCommandTests.cs (66)
38
var snapshot = new ResourceSnapshot {
Name
= "resource", State = state, ExitCode = exitCode };
52
new() {
Name
= "running", ResourceType = "Project", State = "Running", HealthStatus = "Healthy" },
53
new() {
Name
= "finished-positive", ResourceType = "Project", State = "Finished", ExitCode = 1 },
54
new() {
Name
= "finished-negative", ResourceType = "Project", State = "Finished", ExitCode = -532462766 },
55
new() {
Name
= "finished-zero", ResourceType = "Project", State = "Finished", ExitCode = 0 },
56
new() {
Name
= "finished-unknown", ResourceType = "Project", State = "Finished" },
57
new() {
Name
= "exited-positive", ResourceType = "Container", State = "Exited", ExitCode = 1 },
58
new() {
Name
= "exited-negative", ResourceType = "Container", State = "Exited", ExitCode = -532462766 },
59
new() {
Name
= "exited-zero", ResourceType = "Container", State = "Exited", ExitCode = 0 },
60
new() {
Name
= "exited-unknown", ResourceType = "Container", State = "Exited" }
78
new() {
Name
= "api", ResourceType = "Project", State = "Finished", ExitCode = -532462766 }
103
new() {
Name
= "api", ResourceType = "Project", State = "Finished", ExitCode = -532462766 }
122
new ResourceSnapshot {
Name
= "cache", ResourceType = "Container", ResourceTypeDisplayName = "Redis", State = "Running" },
123
new ResourceSnapshot {
Name
= "postgres", ResourceType = "Container", ResourceTypeDisplayName = "PostgreSQL Server", State = "Running" },
124
new ResourceSnapshot {
Name
= "orders", ResourceType = "Project", ResourceTypeDisplayName = "ASP.NET Core", State = "Running" },
125
new ResourceSnapshot {
Name
= "generic", ResourceType = "Container", State = "Running" }
499
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
507
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
509
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
511
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
553
Name
= $"resource-{index}",
563
Name
= initialSnapshots[0].Name,
570
Name
= initialSnapshots[^1].Name,
631
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
667
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
668
new ResourceSnapshot {
Name
= "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" },
669
new ResourceSnapshot {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" },
696
Name
= "redis",
760
new ResourceSnapshot {
Name
= "redis", Version = 1, DisplayName = "redis", ResourceType = "Container", State = "Starting" },
799
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
808
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
810
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
812
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
843
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
873
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
897
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
925
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
955
Name
= "postgres",
995
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1026
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1027
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1028
new ResourceSnapshot {
Name
= "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
1052
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1053
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1054
new ResourceSnapshot {
Name
= "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
1080
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1081
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1105
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1106
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1133
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1134
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1165
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running",
1178
new ResourceSnapshot {
Name
= "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" },
1179
new ResourceSnapshot {
Name
= "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" },
1180
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Running", IsHidden = true },
1181
new ResourceSnapshot {
Name
= "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" }
1200
Name
= "end", DisplayName = "api\" # & <b> \\ `\nnext", ResourceType = "Project", State = "Running",
1222
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running",
1225
new ResourceSnapshot {
Name
= "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" },
1226
new ResourceSnapshot {
Name
= "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" }
1243
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Hidden" },
1244
new ResourceSnapshot {
Name
= "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" }
1275
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Running" }
1402
Name
= "redis",
1468
Name
= "redis",
1481
Name
= "redis",
Commands\ExportCommandTests.cs (26)
50
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
51
new ResourceSnapshot {
Name
= "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
127
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
204
new ResourceSnapshot {
Name
= "other-resource", DisplayName = "other-resource", ResourceType = "Project", State = "Running" },
227
new ResourceSnapshot {
Name
= "target-resource", DisplayName = "target-resource", ResourceType = "Container", State = "Running" },
330
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
331
new ResourceSnapshot {
Name
= "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
332
new ResourceSnapshot {
Name
= "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
450
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
451
new ResourceSnapshot {
Name
= "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
507
new ResourceSnapshot {
Name
= "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
508
new ResourceSnapshot {
Name
= "webfrontend", DisplayName = "webfrontend", ResourceType = "Project", State = "Running" },
565
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
566
new ResourceSnapshot {
Name
= "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
567
new ResourceSnapshot {
Name
= "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
615
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
616
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
617
new ResourceSnapshot {
Name
= "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
659
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
660
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
703
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
704
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
745
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
781
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
824
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
825
new ResourceSnapshot {
Name
= "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
Commands\LogsCommandTests.cs (12)
735
Name
= "redis",
742
Name
= "aspire-dashboard",
825
Name
= "redis",
856
Name
= "redis",
866
Name
= "redis",
873
Name
= "late-hidden",
992
Name
= "redis",
999
Name
= "aspire-dashboard",
1556
Name
= "redis",
1564
Name
= "apiservice-abc123",
1571
Name
= "apiservice-def456",
1635
Name
= "late-hidden",
Commands\ResourceCommandTests.cs (1)
2351
Name
= name,
Commands\TerminalCommandTests.cs (1)
822
Name
= name,
Commands\TerminalResourceResolverTests.cs (17)
27
new() {
Name
= "shell-def456", DisplayName = "shell" },
28
new() {
Name
= "shell-abc123", DisplayName = "shell" }
53
new() {
Name
= "shell-abc123", DisplayName = "shell", Properties = Properties(replicaIndex) }
83
new() {
Name
= "shell-abc123", DisplayName = "shell", Properties = Properties("0") },
84
new() {
Name
= "shell-def456", DisplayName = "shell", Properties = Properties("1") }
108
new() {
Name
= "other-abc123", DisplayName = "shell-def456", Properties = Properties("0") },
109
new() {
Name
= "shell-def456", DisplayName = "shell", Properties = Properties("1") }
144
new() {
Name
= "shell-abc123", DisplayName = "shell" },
145
new() {
Name
= "shell-def456", DisplayName = "shell" }
177
new() {
Name
= "shell-abc123", DisplayName = "shell" },
178
new() {
Name
= "shell-def456", DisplayName = "shell" }
214
new() {
Name
= "shell-def456", DisplayName = "shell", Properties = Properties(replicaIndex) }
250
Name
= "shell-def456",
279
new() {
Name
= "shell-abc123", DisplayName = "shell" },
280
new() {
Name
= "shell-def456", DisplayName = "shell" }
306
new() {
Name
= "shell-abc123", DisplayName = "shell", Properties = Properties("0") }
336
ResourceSnapshots = hasOtherInstances ? [new() {
Name
= "shell-abc123", DisplayName = "shell" }] : [],
Commands\TerminalTapePlayCommandTests.cs (7)
135
new() {
Name
= "shell-abc123", DisplayName = "shell" },
136
new() {
Name
= "shell-def456", DisplayName = "shell" }
172
new() {
Name
= "shell-def456", DisplayName = "shell" },
173
new() {
Name
= "shell-abc123", DisplayName = "shell" }
209
Name
= "shell-abc123",
215
Name
= "shell-def456",
567
new ResourceSnapshot {
Name
= "shell-0", DisplayName = "shell", ResourceType = "Executable", State = "Running" }
Mcp\ExcludeFromMcpTests.cs (15)
31
Name
= "test",
43
Name
= "test",
58
Name
= "test",
73
Name
= "test",
88
Name
= "test",
109
Name
= ApiServiceName,
125
Name
= SecretServiceName,
167
Name
= SecretServiceName,
213
Name
= SecretServiceName,
251
Name
= ApiServiceName,
285
Name
= SecretServiceName,
424
Name
= ApiServiceName,
431
Name
= SecretServiceName,
472
Name
= ApiServiceName,
479
Name
= SecretServiceName,
Mcp\ListResourcesToolTests.cs (42)
78
Name
= "api-service",
106
Name
= "api",
126
Name
= "redis-instance-1",
133
Name
= "redis-instance-2",
140
Name
= "redis-instance-3",
176
Name
= "api",
191
Name
= "redis-visible",
198
Name
= "redis-hidden",
233
Name
= "api",
241
Name
= "redis-visible",
248
Name
= "redis-hidden",
313
Name
= "api-service",
320
Name
= "redis",
327
Name
= "postgres",
391
Name
= name,
394
connection.ResourceSnapshots.Insert(0, new ResourceSnapshot {
Name
= "hidden", IsHidden = true });
395
connection.ResourceSnapshots.Insert(1, new ResourceSnapshot {
Name
= "hidden-state", State = "Hidden" });
398
Name
= "excluded",
447
new ResourceSnapshot {
Name
= "first" },
448
new ResourceSnapshot {
Name
= "second" },
449
new ResourceSnapshot {
Name
= "third" }));
478
Name
= $"resource-{index:D3}"
482
Name
= "api",
489
snapshots.Add(new ResourceSnapshot {
Name
= "redis-visible", DisplayName = "Redis" });
490
snapshots.Add(new ResourceSnapshot {
Name
= "redis-hidden", DisplayName = "Redis", IsHidden = true });
510
Name
= "api",
592
monitor.AddConnection("hash1", "socket.hash1", CreateConnection(new ResourceSnapshot {
Name
= "api", Commands = commands }));
641
Name
= "model",
668
Name
= name,
728
Name
= "api-service",
738
Name
= "worker",
766
Name
= "project",
777
Name
= "executable",
788
Name
= "container",
817
Name
= "unicode-source",
844
Name
= "endpoints",
888
Name
= "api-service",
967
Name
= "redis-instance",
979
Name
= "worker",
989
Name
= "custom",
999
Name
= "case-mismatched-project",
1057
Name
= "custom",
Mcp\WaitForResourcesToolTests.cs (24)
91
Name
= "api",
98
Name
= "hidden-proxy",
104
Name
= "secret-store",
157
Name
= $"resource-{index}",
185
Name
= resourceName,
219
Name
= resourceName,
256
Name
= "hidden-proxy",
262
Name
= "secret-store",
309
Name
= "api-runtime",
315
Name
= "worker-runtime",
364
Name
= "hidden-runtime",
371
Name
= "excluded-runtime",
382
Name
= "replica-a",
388
Name
= "replica-b",
485
Name
= name,
540
new ResourceSnapshot {
Name
= "ready", State = "Running" },
541
new ResourceSnapshot {
Name
= "slow", State = "Starting" });
570
Name
= "api",
611
new ResourceSnapshot {
Name
= "api", State = "Starting" },
612
new ResourceSnapshot {
Name
= "worker", State = "Starting" },
613
new ResourceSnapshot {
Name
= "database", State = "Starting" });
693
new ResourceSnapshot {
Name
= "api", State = "Starting" },
694
new ResourceSnapshot {
Name
= "worker", State = "Starting" });
775
var connection = CreateConnection(new ResourceSnapshot {
Name
= "api", State = "Starting" });
78 references to Name
aspire (65)
Backchannel\AppHostAuxiliaryBackchannel.cs (4)
412
return snapshots.OrderBy(s => s.
Name
, StringComparer.OrdinalIgnoreCase).ToList();
434
return snapshots.OrderBy(s => s.
Name
, StringComparer.OrdinalIgnoreCase).ToList();
667
snapshots = snapshots.Where(s => s.
Name
.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList();
707
if (!string.IsNullOrEmpty(filter) && !snapshot.
Name
.Contains(filter, StringComparison.OrdinalIgnoreCase))
Backchannel\ResourceSnapshotMapper.cs (10)
20
/// <see cref="ResourceSnapshot.
Name
"/> and <see cref="ResourceSnapshot.DisplayName"/>.
24
return snapshots.Where(s => string.Equals(s.
Name
, resourceName, StringComparisons.ResourceName)
106
ResourceName = match.
Name
143
var resourcePath = DashboardUrls.ResourcesUrl(snapshot.
Name
);
149
Name = snapshot.
Name
,
302
/// First tries an exact match on <see cref="ResourceSnapshot.
Name
"/>, then falls back
312
var exactMatches = snapshots.Where(s => string.Equals(s.
Name
, resourceName, StringComparison.OrdinalIgnoreCase)).ToList();
366
return resource.
Name
;
371
return resource.DisplayName ?? resource.
Name
;
403
: new HashSet<string>(allSnapshots.Where(IsHiddenResource).Select(s => s.
Name
), StringComparers.ResourceName);
Backchannel\ResourceSnapshotWatcher.cs (10)
113
_resources[snapshot.
Name
] = snapshot;
159
if (!_resources.TryGetValue(snapshot.
Name
, out var currentSnapshot) ||
162
_resources[snapshot.
Name
] = snapshot;
181
_resources.TryGetValue(snapshot.
Name
, out var currentSnapshot) &&
193
_resources[snapshot.
Name
] = snapshot;
197
if (_pendingUpdates.ContainsKey(snapshot.
Name
) || _pendingUpdates.Count < UpdateBufferCapacity)
199
_pendingUpdates[snapshot.
Name
] = update;
218
snapshot.
Name
,
269
.OrderBy(update => update.Snapshot.
Name
, StringComparer.OrdinalIgnoreCase)
365
.OrderBy(snapshot => snapshot.
Name
, StringComparer.OrdinalIgnoreCase)
Commands\DescribeCommand.cs (12)
253
r => r.
Name
,
258
.Select(target => target.
Name
));
295
if (!resolved.Any(r => string.Equals(r.
Name
, snapshot.
Name
, StringComparison.OrdinalIgnoreCase)))
313
if (lastDisplayedContent.TryGetValue(snapshot.
Name
, out var lastValue) && lastValue is string lastJson && lastJson == json)
318
lastDisplayedContent[snapshot.
Name
] = json;
325
if (lastDisplayedContent.TryGetValue(snapshot.
Name
, out var lastValue) && lastValue.Equals(displayState))
330
lastDisplayedContent[snapshot.
Name
] = displayState;
338
.Select((snapshot, index) => (snapshot.
Name
, index))
351
if (snapshotIndexes.TryGetValue(snapshot.
Name
, out var index))
362
snapshotIndexes.Add(snapshot.
Name
, currentSnapshots.Count);
411
var resourceUrl = DashboardUrls.CombineUrl(dashboardBaseUrl, DashboardUrls.ResourcesUrl(resource: snapshot.
Name
));
Commands\ExportCommand.cs (3)
235
? new HashSet<string>(ResourceSnapshotMapper.WhereMatchesResourceName(snapshots, resourceName).Select(s => s.
Name
), StringComparers.ResourceName)
240
if (matchingNames is not null && !matchingNames.Contains(snapshot.
Name
))
278
var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.
Name
, name, StringComparisons.ResourceName));
Commands\LogsCommand.cs (1)
500
var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.
Name
, resourceName, StringComparisons.ResourceName));
Commands\McpToolsCommand.cs (2)
77
var resourceName = r.DisplayName ?? r.
Name
;
103
var resourceName = resource.DisplayName ?? resource.
Name
;
Commands\TerminalResourceResolver.cs (3)
47
string.Join(", ", matches.Select(s => s.
Name
).Order(StringComparers.ResourceName))));
56
: snapshot.
Name
;
108
TerminalCommandStrings.InstanceTerminalUnavailable, snapshot.
Name
));
Mcp\McpResourceToolRefreshService.cs (1)
106
var routedResourceName = resource.DisplayName ?? resource.
Name
;
Mcp\Tools\ListResourcesTool.cs (13)
190
.OrderBy(snapshot => snapshot.
Name
, StringComparer.Ordinal)
205
Name = GetBoundedText(snapshot.
Name
),
356
identities[snapshot.
Name
] = (
357
hasDuplicateDisplayName ? snapshot.
Name
: snapshot.DisplayName ?? snapshot.
Name
,
358
snapshot.
Name
);
370
: (displayName, snapshot.
Name
);
380
.Select(snapshot => snapshot.
Name
)
388
targets[snapshot.
Name
] = [snapshot.
Name
];
404
if (!displayTargets.Contains(snapshot.
Name
, StringComparers.ResourceName))
406
displayTargets.Add(snapshot.
Name
);
497
var dashboardUrl = DashboardUrls.CombineUrl(dashboardBaseUrl, DashboardUrls.ResourcesUrl(snapshot.
Name
));
Mcp\Tools\McpToolHelpers.cs (1)
467
excludedNames.Add(snapshot.
Name
);
Mcp\Tools\WaitForResourcesTool.cs (5)
144
.Select(static snapshot => snapshot.
Name
)
166
.DistinctBy(static target => target.
Name
, StringComparers.ResourceName)
173
validTargets.Select(static target => target.
Name
).ToArray(),
181
target.Failure ?? MapWaitResult(waitResultsByName[target.Resource!.
Name
])).ToArray();
342
string.Equals(snapshot.
Name
, resourceName, StringComparisons.ResourceName));
Aspire.Cli.Tests (13)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (2)
28
Assert.Equal("api", snapshot.
Name
);
47
Assert.Equal("api", resource.
Name
);
Backchannel\ResourceSnapshotMapperTests.cs (3)
459
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
474
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
505
Assert.Equal("cache-abc12345", result[0].
Name
);
Backchannel\ResourceSnapshotWatcherTests.cs (3)
523
.Select(update => new { update.
Name
, update.DisplayName, update.State })
606
snapshot.
Name
,
621
Assert.Same(firstSnapshot, watcher.GetResource(firstSnapshot.
Name
));
Commands\DescribeCommandTests.cs (5)
563
Name = initialSnapshots[0].
Name
,
570
Name = initialSnapshots[^1].
Name
,
615
var expectedStates = changedSnapshots.Any(changed => StringComparers.ResourceName.Equals(changed.
Name
, snapshot.
Name
))
618
Assert.Equal(expectedStates, resourcesByName[snapshot.
Name
]);