177 writes to DisplayName
Aspire.Cli.Tests (177)
Backchannel\ResourceSnapshotMapperTests.cs (25)
40
DisplayName
= "frontend",
136
DisplayName
= "frontend",
160
DisplayName
= "frontend",
186
DisplayName
= "parameter",
214
DisplayName
= "parameter",
241
DisplayName
= "frontend",
284
DisplayName
= "frontend",
313
DisplayName
= "messaging",
321
DisplayName
= "frontend",
339
DisplayName
= "frontend",
371
DisplayName
= "messaging",
378
DisplayName
= "messaging",
386
DisplayName
= "frontend",
403
new() { Name = "cache-zuyppzgw",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
404
new() { Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running" }
418
new() { Name = "cache-zuyppzgw",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
419
new() { Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running" }
433
new() { Name = "cache-abc12345",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
434
new() { Name = "cache-def67890",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
435
new() { Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running" }
448
new() { Name = "cache-abc12345",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
449
new() { Name = "cache-def67890",
DisplayName
= "cache", ResourceType = "Container", State = "Running" },
450
new() { Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running" }
464
new() { Name = "cache-zuyppzgw",
DisplayName
= "cache", ResourceType = "Container", State = "Running" }
477
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)
276
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
284
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
286
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Stopping" },
288
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Stopping" },
331
DisplayName
= $"resource-{index}",
341
DisplayName
= initialSnapshots[0].DisplayName,
348
DisplayName
= initialSnapshots[^1].DisplayName,
408
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
444
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
445
new ResourceSnapshot { Name = "postgres",
DisplayName
= "postgres", ResourceType = "Container", State = "Running" },
446
new ResourceSnapshot { Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running" },
474
DisplayName
= "redis",
537
new ResourceSnapshot { Name = "redis", Version = 1,
DisplayName
= "redis", ResourceType = "Container", State = "Starting" },
576
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
585
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
587
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Stopping" },
589
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Stopping" },
620
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
650
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
674
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
702
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
733
DisplayName
= "postgres",
772
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
803
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
804
new ResourceSnapshot { Name = "aspire-dashboard",
DisplayName
= "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
805
new ResourceSnapshot { Name = "hidden-svc",
DisplayName
= "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
829
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
830
new ResourceSnapshot { Name = "aspire-dashboard",
DisplayName
= "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
831
new ResourceSnapshot { Name = "hidden-svc",
DisplayName
= "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true },
857
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
858
new ResourceSnapshot { Name = "aspire-dashboard",
DisplayName
= "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
882
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
883
new ResourceSnapshot { Name = "aspire-dashboard",
DisplayName
= "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
910
new ResourceSnapshot { Name = "redis",
DisplayName
= "redis", ResourceType = "Container", State = "Running" },
911
new ResourceSnapshot { Name = "aspire-dashboard",
DisplayName
= "aspire-dashboard", ResourceType = "Executable", State = "Hidden" },
942
Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running",
955
new ResourceSnapshot { Name = "api-2",
DisplayName
= "api", ResourceType = "Project", State = "Running" },
956
new ResourceSnapshot { Name = "api-1",
DisplayName
= "api", ResourceType = "Project", State = "Running" },
957
new ResourceSnapshot { Name = "cache",
DisplayName
= "cache", ResourceType = "Container", State = "Running", IsHidden = true },
958
new ResourceSnapshot { Name = "connection",
DisplayName
= "connection", ResourceType = "Parameter", State = "Running" }
977
Name = "end",
DisplayName
= "api\" # & <b> \\ `\nnext", ResourceType = "Project", State = "Running",
999
Name = "frontend",
DisplayName
= "frontend", ResourceType = "Project", State = "Running",
1002
new ResourceSnapshot { Name = "api-2",
DisplayName
= "api", ResourceType = "Project", State = "Running" },
1003
new ResourceSnapshot { Name = "api-1",
DisplayName
= "api", ResourceType = "Project", State = "Running" }
1020
new ResourceSnapshot { Name = "cache",
DisplayName
= "cache", ResourceType = "Container", State = "Hidden" },
1021
new ResourceSnapshot { Name = "connection",
DisplayName
= "connection", ResourceType = "Parameter", State = "Running" }
1052
new ResourceSnapshot { Name = "cache",
DisplayName
= "cache", ResourceType = "Container", State = "Running" }
1132
DisplayName
= "redis",
1198
DisplayName
= "redis",
1211
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)
796
DisplayName
= displayName,
Commands\TerminalTapePlayCommandTests.cs (1)
508
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)
229
var resourcesByDisplayName = graphResources.ToLookup(r => r.
DisplayName
, StringComparers.ResourceName);
235
.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)
35
var canonicalName = !string.IsNullOrEmpty(matches[0].
DisplayName
)
36
? matches[0].
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)
341
DisplayName = initialSnapshots[0].
DisplayName
,
348
DisplayName = initialSnapshots[^1].
DisplayName
,