34 writes to Name
Aspire.Cli.Tests (34)
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\LogsCommandTests.cs (3)
591Name = "redis", 599Name = "apiservice-abc123", 606Name = "apiservice-def456",
Mcp\ListResourcesToolTests.cs (5)
60Name = "api-service", 67Name = "redis", 74Name = "postgres", 106Name = "api-service", 145Name = "api-service",
23 references to Name
aspire (20)
Backchannel\AppHostAuxiliaryBackchannel.cs (2)
498snapshots = snapshots.Where(s => s.Name.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList(); 534if (!string.IsNullOrEmpty(filter) && !snapshot.Name.Contains(filter, StringComparison.OrdinalIgnoreCase))
Backchannel\ResourceSnapshotMapper.cs (7)
90ResourceName = match.Name 113var resourcePath = DashboardUrls.ResourcesUrl(snapshot.Name); 119Name = snapshot.Name, 143/// First tries an exact match on <see cref="ResourceSnapshot.Name"/>, then falls back 153var exactMatches = snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparison.OrdinalIgnoreCase)).ToList(); 207return resource.Name; 212return resource.DisplayName ?? resource.Name;
Commands\DescribeCommand.cs (8)
200allResources[snapshot.Name] = snapshot; 211allResources[snapshot.Name] = snapshot; 219if (!resolved.Any(r => string.Equals(r.Name, snapshot.Name, StringComparison.OrdinalIgnoreCase))) 233if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue is string lastJson && lastJson == json) 238lastDisplayedContent[snapshot.Name] = json; 246if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue.Equals(displayState)) 251lastDisplayedContent[snapshot.Name] = displayState;
Commands\LogsCommand.cs (2)
168if (!snapshots.Any(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName) 348var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName));
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);