56 writes to Name
Aspire.Cli.Tests (56)
Backchannel\ResourceSnapshotMapperTests.cs (13)
16Name = "frontend", 64new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 65new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 79new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 80new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 94new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 95new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 96new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 109new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 110new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 111new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 125new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" } 138new() { Name = "Cache-Zuyppzgw", DisplayName = "Cache", ResourceType = "Container", State = "Running" }
Commands\AgentMcpCommandTests.cs (5)
168Name = "test-resource-abcd1234", 238Name = "my-resource-abcd1234", 315Name = "db1-mcp-ypnvhwvw", 431Name = "db-mcp-abcd1234", 520Name = "db-mcp-xyz",
Commands\DescribeCommandTests.cs (8)
262new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 264new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 266new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 268new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 306new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 308new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 310new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 312new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" },
Commands\ExportCommandTests.cs (18)
50new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 51new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 128new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 205new ResourceSnapshot { Name = "other-resource", DisplayName = "other-resource", ResourceType = "Project", State = "Running" }, 228new ResourceSnapshot { Name = "target-resource", DisplayName = "target-resource", ResourceType = "Container", State = "Running" }, 332new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 333new ResourceSnapshot { Name = "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 334new ResourceSnapshot { Name = "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 453new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 454new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 511new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 512new ResourceSnapshot { Name = "webfrontend", DisplayName = "webfrontend", ResourceType = "Project", State = "Running" }, 570new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 571new ResourceSnapshot { Name = "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 572new ResourceSnapshot { Name = "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 621new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 646new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 647new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
Commands\LogsCommandTests.cs (3)
591Name = "redis", 599Name = "apiservice-abc123", 606Name = "apiservice-def456",
Commands\PsCommandTests.cs (4)
217Name = "apiservice", 229Name = "redis", 293Name = "apiservice", 348new ResourceSnapshot { Name = "apiservice", ResourceType = "Project", State = "Running" }
Mcp\ListResourcesToolTests.cs (5)
60Name = "api-service", 67Name = "redis", 74Name = "postgres", 106Name = "api-service", 145Name = "api-service",
31 references to Name
aspire (28)
Backchannel\AppHostAuxiliaryBackchannel.cs (4)
299snapshots.Sort((a, b) => string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase)); 501snapshots = snapshots.Where(s => s.Name.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList(); 537if (!string.IsNullOrEmpty(filter) && !snapshot.Name.Contains(filter, StringComparison.OrdinalIgnoreCase))
Backchannel\ResourceSnapshotMapper.cs (9)
18/// <see cref="ResourceSnapshot.Name"/> and <see cref="ResourceSnapshot.DisplayName"/>. 22return snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName) 100ResourceName = match.Name 123var resourcePath = DashboardUrls.ResourcesUrl(snapshot.Name); 129Name = snapshot.Name, 153/// First tries an exact match on <see cref="ResourceSnapshot.Name"/>, then falls back 163var exactMatches = snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparison.OrdinalIgnoreCase)).ToList(); 217return resource.Name; 222return resource.DisplayName ?? resource.Name;
Commands\DescribeCommand.cs (8)
202allResources[snapshot.Name] = snapshot; 213allResources[snapshot.Name] = snapshot; 221if (!resolved.Any(r => string.Equals(r.Name, snapshot.Name, StringComparison.OrdinalIgnoreCase))) 235if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue is string lastJson && lastJson == json) 240lastDisplayedContent[snapshot.Name] = json; 248if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue.Equals(displayState)) 253lastDisplayedContent[snapshot.Name] = displayState;
Commands\ExportCommand.cs (3)
209? new HashSet<string>(ResourceSnapshotMapper.WhereMatchesResourceName(snapshots, resourceName).Select(s => s.Name), StringComparers.ResourceName) 214if (matchingNames is not null && !matchingNames.Contains(snapshot.Name)) 246var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.Name, name, StringComparisons.ResourceName));
Commands\LogsCommand.cs (1)
353var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName));
Commands\McpToolsCommand.cs (2)
87var resourceName = r.DisplayName ?? r.Name; 113var resourceName = resource.DisplayName ?? resource.Name;
Mcp\McpResourceToolRefreshService.cs (1)
101var routedResourceName = resource.DisplayName ?? resource.Name;
Aspire.Cli.Tests (3)
Backchannel\ResourceSnapshotMapperTests.cs (3)
71Assert.Equal("cache-zuyppzgw", result[0].Name); 86Assert.Equal("cache-zuyppzgw", result[0].Name); 117Assert.Equal("cache-abc12345", result[0].Name);