201 writes to DisplayName
Aspire.Cli.Tests (201)
Backchannel\ResourceSnapshotMapperTests.cs (26)
41
DisplayName
= "MAUI",
73
DisplayName
= "frontend",
169
DisplayName
= "frontend",
193
DisplayName
= "frontend",
219
DisplayName
= "parameter",
247
DisplayName
= "parameter",
274
DisplayName
= "frontend",
317
DisplayName
= "frontend",
346
DisplayName
= "messaging",
354
DisplayName
= "frontend",
372
DisplayName
= "frontend",
404
DisplayName
= "messaging",
411
DisplayName
= "messaging",
419
DisplayName
= "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)
202
DisplayName
= "api",
214
DisplayName
= "api",
247
DisplayName
= "api",
260
DisplayName
= "api",
294
DisplayName
= "api",
307
DisplayName
= "api",
341
DisplayName
= "api",
353
DisplayName
= "api",
363
DisplayName
= "api",
488
DisplayName
= $"resource-{resourceIndex}-update-{updateIndex}",
559
DisplayName
= "resource-0",
585
DisplayName
= $"resource-{resourceIndex}",
Commands\AgentMcpCommandTests.cs (13)
240
DisplayName
= "test-resource",
304
DisplayName
= "annotated-resource",
381
DisplayName
= "my-resource",
514
DisplayName
= "db1-mcp",
665
DisplayName
= "unrelated-db",
710
DisplayName
= "pinned-db",
836
DisplayName
= "API",
928
DisplayName
= "pinned-db",
1126
DisplayName
= "pinned-db",
1207
DisplayName
= "db-mcp",
1409
DisplayName
= "db-mcp",
1838
DisplayName
= displayName,
1953
DisplayName
= "contract-resource",
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" },
441
DisplayName
= $"resource-{index}",
451
DisplayName
= initialSnapshots[0].DisplayName,
458
DisplayName
= initialSnapshots[^1].DisplayName,
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" },
584
DisplayName
= "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" },
843
DisplayName
= "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" }
1290
DisplayName
= "redis",
1356
DisplayName
= "redis",
1369
DisplayName
= "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)
736
DisplayName
= "redis",
743
DisplayName
= "aspire-dashboard",
826
DisplayName
= "redis",
857
DisplayName
= "redis",
867
DisplayName
= "redis",
874
DisplayName
= "late-hidden",
993
DisplayName
= "redis",
1000
DisplayName
= "aspire-dashboard",
1557
DisplayName
= "redis",
1565
DisplayName
= "apiservice",
1572
DisplayName
= "apiservice",
1636
DisplayName
= "late-hidden",
Commands\ResourceCommandTests.cs (1)
2352
DisplayName
= name,
Commands\TerminalCommandTests.cs (1)
823
DisplayName
= displayName,
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) }
251
DisplayName
= "shell",
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" }
210
DisplayName
= "shell",
216
DisplayName
= "shell",
567
new ResourceSnapshot { Name = "shell-0",
DisplayName
= "shell", ResourceType = "Executable", State = "Running" }
Mcp\ExcludeFromMcpTests.cs (10)
110
DisplayName
= "API Service",
126
DisplayName
= "Secret Service",
168
DisplayName
= "Secret Service",
214
DisplayName
= "Secret Service",
252
DisplayName
= "API Service",
286
DisplayName
= "Secret Service",
425
DisplayName
= "API Service",
432
DisplayName
= "Secret Service",
473
DisplayName
= "API Service",
480
DisplayName
= "Secret Service",
Mcp\ListResourcesToolTests.cs (18)
105
DisplayName
= "API",
125
DisplayName
= "Redis",
132
DisplayName
= "Redis",
139
DisplayName
= "Redis",
175
DisplayName
= "API",
190
DisplayName
= "Redis",
197
DisplayName
= "Redis",
232
DisplayName
= "API",
240
DisplayName
= "Redis",
247
DisplayName
= "Redis",
312
DisplayName
= "API Service",
319
DisplayName
= "Redis",
326
DisplayName
= "PostgreSQL",
487
snapshots.Add(new ResourceSnapshot { Name = "redis-visible",
DisplayName
= "Redis" });
488
snapshots.Add(new ResourceSnapshot { Name = "redis-hidden",
DisplayName
= "Redis", IsHidden = true });
667
DisplayName
= index == 0 ? longText : name,
887
DisplayName
= "API Service",
966
DisplayName
= "Redis",
Mcp\WaitForResourcesToolTests.cs (8)
92
DisplayName
= "API",
310
DisplayName
= "API",
316
DisplayName
= "Worker",
365
DisplayName
= "Hidden",
372
DisplayName
= "Excluded",
383
DisplayName
= "Replica",
389
DisplayName
= "Replica",
571
DisplayName
= "API",
28 references to DisplayName
aspire (25)
Backchannel\ResourceSnapshotMapper.cs (9)
20
/// <see cref="ResourceSnapshot.Name"/> and <see cref="ResourceSnapshot.
DisplayName
"/>.
25
|| string.Equals(s.
DisplayName
, resourceName, StringComparisons.ResourceName));
98
.Where(r => string.Equals(r.
DisplayName
, relationship.ResourceName, StringComparisons.ResourceName))
150
DisplayName = snapshot.
DisplayName
,
302
/// to matching by <see cref="ResourceSnapshot.
DisplayName
"/> only when the display name is
319
var displayNameMatches = snapshots.Where(s => string.Equals(s.
DisplayName
, resourceName, StringComparison.OrdinalIgnoreCase)).ToList();
358
if (string.Equals(item.
DisplayName
, resource.
DisplayName
, StringComparisons.ResourceName))
370
return resource.
DisplayName
?? resource.Name;
Commands\DescribeCommand.cs (2)
250
var resourcesByDisplayName = graphResources.ToLookup(r => r.
DisplayName
, StringComparers.ResourceName);
256
.Where(relationship => !string.Equals(relationship.ResourceName, r.
DisplayName
, StringComparisons.ResourceName))
Commands\McpToolsCommand.cs (2)
77
var resourceName = r.
DisplayName
?? r.Name;
103
var resourceName = resource.
DisplayName
?? resource.Name;
Commands\TerminalResourceResolver.cs (2)
54
var canonicalName = !string.IsNullOrEmpty(snapshot.
DisplayName
)
55
? snapshot.
DisplayName
Mcp\McpResourceToolRefreshService.cs (1)
106
var routedResourceName = resource.
DisplayName
?? resource.Name;
Mcp\Tools\ListResourcesTool.cs (6)
205
DisplayName = GetBoundedText(snapshot.
DisplayName
),
340
if (snapshot.
DisplayName
is { } displayName)
352
var hasDuplicateDisplayName = snapshot.
DisplayName
is { } displayName &&
355
hasDuplicateDisplayName ? snapshot.Name : snapshot.
DisplayName
?? snapshot.Name,
361
if (snapshot.
DisplayName
is not { } displayName || identities.ContainsKey(displayName))
391
if (snapshot.
DisplayName
is not { } displayName || runtimeNames.Contains(displayName))
Mcp\Tools\McpToolHelpers.cs (2)
468
if (snapshot.
DisplayName
is not null)
470
excludedNames.Add(snapshot.
DisplayName
);
Mcp\Tools\WaitForResourcesTool.cs (1)
350
snapshot.
DisplayName
,
Aspire.Cli.Tests (3)
Backchannel\ResourceSnapshotWatcherTests.cs (1)
523
.Select(update => new { update.Name, update.
DisplayName
, update.State })
Commands\DescribeCommandTests.cs (2)
451
DisplayName = initialSnapshots[0].
DisplayName
,
458
DisplayName = initialSnapshots[^1].
DisplayName
,