275 writes to Name
Aspire.Cli.Tests (275)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (1)
242
Name
= "api",
Backchannel\ResourceSnapshotMapperTests.cs (26)
40
Name
= "mauiapp-android-emulator",
72
Name
= "frontend",
168
Name
= "frontend",
192
Name
= "frontend",
218
Name
= "parameter",
246
Name
= "parameter",
273
Name
= "frontend",
316
Name
= "frontend",
345
Name
= "messaging-abcxyz",
353
Name
= "frontend",
371
Name
= "frontend",
403
Name
= "messaging-abcxyz",
410
Name
= "messaging-defuvw",
418
Name
= "frontend",
436
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
437
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
451
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
452
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
466
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
467
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
468
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
481
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
482
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
483
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
497
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }
510
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 }
82
[.. resources, new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }]));
90
new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" },
94
Name
= "generator", State = "NotStarted", HealthStatus = "Unhealthy",
110
new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" },
111
new() {
Name
= "worker", State = "Waiting" },
112
new() {
Name
= "database", State = "Running", HealthStatus = "Unhealthy" }
Backchannel\TrayWatchStreamTests.cs (14)
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 });
824
connection.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
865
initial.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
868
replacement.ResourceSnapshots = [new() {
Name
= "api", State = "Waiting" }];
931
initial.ResourceSnapshots = [new() {
Name
= "api", State = "Running", HealthStatus = "Healthy" }];
934
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 (50)
386
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
394
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
396
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
398
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
440
Name
= $"resource-{index}",
450
Name
= initialSnapshots[0].Name,
457
Name
= initialSnapshots[^1].Name,
518
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
554
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
555
new ResourceSnapshot {
Name
= "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" },
556
new ResourceSnapshot {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" },
583
Name
= "redis",
647
new ResourceSnapshot {
Name
= "redis", Version = 1, DisplayName = "redis", ResourceType = "Container", State = "Starting" },
686
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
695
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
697
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
699
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
730
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
760
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
784
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
812
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
842
Name
= "postgres",
882
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
913
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
914
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
915
new ResourceSnapshot {
Name
= "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
939
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
940
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
941
new ResourceSnapshot {
Name
= "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
967
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
968
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
992
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
993
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1020
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
1021
new ResourceSnapshot {
Name
= "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
1052
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running",
1065
new ResourceSnapshot {
Name
= "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" },
1066
new ResourceSnapshot {
Name
= "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" },
1067
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Running", IsHidden = true },
1068
new ResourceSnapshot {
Name
= "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" }
1087
Name
= "end", DisplayName = "api\" # & <b> \\ `\nnext", ResourceType = "Project", State = "Running",
1109
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running",
1112
new ResourceSnapshot {
Name
= "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" },
1113
new ResourceSnapshot {
Name
= "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" }
1130
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Hidden" },
1131
new ResourceSnapshot {
Name
= "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" }
1162
new ResourceSnapshot {
Name
= "cache", DisplayName = "cache", ResourceType = "Container", State = "Running" }
1289
Name
= "redis",
1355
Name
= "redis",
1368
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",
104
Name
= "api",
124
Name
= "redis-instance-1",
131
Name
= "redis-instance-2",
138
Name
= "redis-instance-3",
174
Name
= "api",
189
Name
= "redis-visible",
196
Name
= "redis-hidden",
231
Name
= "api",
239
Name
= "redis-visible",
246
Name
= "redis-hidden",
311
Name
= "api-service",
318
Name
= "redis",
325
Name
= "postgres",
389
Name
= name,
392
connection.ResourceSnapshots.Insert(0, new ResourceSnapshot {
Name
= "hidden", IsHidden = true });
393
connection.ResourceSnapshots.Insert(1, new ResourceSnapshot {
Name
= "hidden-state", State = "Hidden" });
396
Name
= "excluded",
445
new ResourceSnapshot {
Name
= "first" },
446
new ResourceSnapshot {
Name
= "second" },
447
new ResourceSnapshot {
Name
= "third" }));
476
Name
= $"resource-{index:D3}"
480
Name
= "api",
487
snapshots.Add(new ResourceSnapshot {
Name
= "redis-visible", DisplayName = "Redis" });
488
snapshots.Add(new ResourceSnapshot {
Name
= "redis-hidden", DisplayName = "Redis", IsHidden = true });
508
Name
= "api",
590
monitor.AddConnection("hash1", "socket.hash1", CreateConnection(new ResourceSnapshot {
Name
= "api", Commands = commands }));
639
Name
= "model",
666
Name
= name,
726
Name
= "api-service",
736
Name
= "worker",
764
Name
= "project",
775
Name
= "executable",
786
Name
= "container",
815
Name
= "unicode-source",
842
Name
= "endpoints",
886
Name
= "api-service",
965
Name
= "redis-instance",
977
Name
= "worker",
987
Name
= "custom",
997
Name
= "case-mismatched-project",
1055
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
,
301
/// First tries an exact match on <see cref="ResourceSnapshot.
Name
"/>, then falls back
311
var exactMatches = snapshots.Where(s => string.Equals(s.
Name
, resourceName, StringComparison.OrdinalIgnoreCase)).ToList();
365
return resource.
Name
;
370
return resource.DisplayName ?? resource.
Name
;
402
: 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)
189
.OrderBy(snapshot => snapshot.
Name
, StringComparer.Ordinal)
204
Name = GetBoundedText(snapshot.
Name
),
354
identities[snapshot.
Name
] = (
355
hasDuplicateDisplayName ? snapshot.
Name
: snapshot.DisplayName ?? snapshot.
Name
,
356
snapshot.
Name
);
368
: (displayName, snapshot.
Name
);
378
.Select(snapshot => snapshot.
Name
)
386
targets[snapshot.
Name
] = [snapshot.
Name
];
402
if (!displayTargets.Contains(snapshot.
Name
, StringComparers.ResourceName))
404
displayTargets.Add(snapshot.
Name
);
495
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)
443
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
458
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
489
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)
450
Name = initialSnapshots[0].
Name
,
457
Name = initialSnapshots[^1].
Name
,
502
var expectedStates = changedSnapshots.Any(changed => StringComparers.ResourceName.Equals(changed.
Name
, snapshot.
Name
))
505
Assert.Equal(expectedStates, resourcesByName[snapshot.
Name
]);