34 writes to Name
Aspire.Cli.Tests (34)
Backchannel\ResourceSnapshotMapperTests.cs (13)
16
Name
= "frontend",
64
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
65
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
79
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" },
80
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
94
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
95
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
96
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
109
new() {
Name
= "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" },
110
new() {
Name
= "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" },
111
new() {
Name
= "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }
125
new() {
Name
= "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }
138
new() {
Name
= "Cache-Zuyppzgw", DisplayName = "Cache", ResourceType = "Container", State = "Running" }
Commands\AgentMcpCommandTests.cs (5)
168
Name
= "test-resource-abcd1234",
238
Name
= "my-resource-abcd1234",
315
Name
= "db1-mcp-ypnvhwvw",
431
Name
= "db-mcp-abcd1234",
520
Name
= "db-mcp-xyz",
Commands\DescribeCommandTests.cs (8)
262
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
264
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
266
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
268
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
306
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
308
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" },
310
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
312
new ResourceSnapshot {
Name
= "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
Commands\LogsCommandTests.cs (3)
591
Name
= "redis",
599
Name
= "apiservice-abc123",
606
Name
= "apiservice-def456",
Mcp\ListResourcesToolTests.cs (5)
60
Name
= "api-service",
67
Name
= "redis",
74
Name
= "postgres",
106
Name
= "api-service",
145
Name
= "api-service",
23 references to Name
aspire (20)
Backchannel\AppHostAuxiliaryBackchannel.cs (2)
498
snapshots = snapshots.Where(s => s.
Name
.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList();
534
if (!string.IsNullOrEmpty(filter) && !snapshot.
Name
.Contains(filter, StringComparison.OrdinalIgnoreCase))
Backchannel\ResourceSnapshotMapper.cs (7)
90
ResourceName = match.
Name
113
var resourcePath = DashboardUrls.ResourcesUrl(snapshot.
Name
);
119
Name = snapshot.
Name
,
143
/// First tries an exact match on <see cref="ResourceSnapshot.
Name
"/>, then falls back
153
var exactMatches = snapshots.Where(s => string.Equals(s.
Name
, resourceName, StringComparison.OrdinalIgnoreCase)).ToList();
207
return resource.
Name
;
212
return resource.DisplayName ?? resource.
Name
;
Commands\DescribeCommand.cs (8)
200
allResources[snapshot.
Name
] = snapshot;
211
allResources[snapshot.
Name
] = snapshot;
219
if (!resolved.Any(r => string.Equals(r.
Name
, snapshot.
Name
, StringComparison.OrdinalIgnoreCase)))
233
if (lastDisplayedContent.TryGetValue(snapshot.
Name
, out var lastValue) && lastValue is string lastJson && lastJson == json)
238
lastDisplayedContent[snapshot.
Name
] = json;
246
if (lastDisplayedContent.TryGetValue(snapshot.
Name
, out var lastValue) && lastValue.Equals(displayState))
251
lastDisplayedContent[snapshot.
Name
] = displayState;
Commands\LogsCommand.cs (2)
168
if (!snapshots.Any(s => string.Equals(s.
Name
, resourceName, StringComparisons.ResourceName)
348
var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.
Name
, resourceName, StringComparisons.ResourceName));
Mcp\McpResourceToolRefreshService.cs (1)
101
var routedResourceName = resource.DisplayName ?? resource.
Name
;
Aspire.Cli.Tests (3)
Backchannel\ResourceSnapshotMapperTests.cs (3)
71
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
86
Assert.Equal("cache-zuyppzgw", result[0].
Name
);
117
Assert.Equal("cache-abc12345", result[0].
Name
);