141 writes to Name
Aspire.Cli.Tests (141)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (1)
200Name = "api",
Backchannel\ResourceSnapshotMapperTests.cs (25)
39Name = "frontend", 135Name = "frontend", 159Name = "frontend", 185Name = "parameter", 213Name = "parameter", 240Name = "frontend", 283Name = "frontend", 312Name = "messaging-abcxyz", 320Name = "frontend", 338Name = "frontend", 370Name = "messaging-abcxyz", 377Name = "messaging-defuvw", 385Name = "frontend", 403new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 404new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 418new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 419new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 433new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 434new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 435new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 448new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 449new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 450new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 464new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" } 477new() { Name = "Cache-Zuyppzgw", DisplayName = "Cache", ResourceType = "Container", State = "Running" }
Backchannel\ResourceSnapshotWatcherTests.cs (12)
112Name = "api", 124Name = "api", 157Name = "api", 170Name = "api", 204Name = "api", 217Name = "api", 251Name = "api", 263Name = "api", 273Name = "api", 398Name = $"resource-{resourceIndex}", 469Name = "resource-0", 495Name = $"resource-{resourceIndex}",
Commands\AgentMcpCommandTests.cs (5)
148Name = "test-resource-abcd1234", 216Name = "my-resource-abcd1234", 291Name = "db1-mcp-ypnvhwvw", 406Name = "db-mcp-abcd1234", 491Name = "db-mcp-xyz",
Commands\DescribeCommandTests.cs (38)
276new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 284new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 286new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 288new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 330Name = $"resource-{index}", 340Name = initialSnapshots[0].Name, 347Name = initialSnapshots[^1].Name, 408new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 444new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 445new ResourceSnapshot { Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" }, 446new ResourceSnapshot { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }, 473Name = "redis", 537new ResourceSnapshot { Name = "redis", Version = 1, DisplayName = "redis", ResourceType = "Container", State = "Starting" }, 576new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 585new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 587new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 589new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 620new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 650new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 674new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 702new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 732Name = "postgres", 772new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 803new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 804new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 805new ResourceSnapshot { Name = "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true }, 829new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 830new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 831new ResourceSnapshot { Name = "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true }, 857new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 858new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 882new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 883new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 910new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 911new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 978Name = "redis", 1044Name = "redis", 1057Name = "redis",
Commands\ExportCommandTests.cs (26)
50new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 51new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 127new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 204new ResourceSnapshot { Name = "other-resource", DisplayName = "other-resource", ResourceType = "Project", State = "Running" }, 227new ResourceSnapshot { Name = "target-resource", DisplayName = "target-resource", ResourceType = "Container", State = "Running" }, 330new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 331new ResourceSnapshot { Name = "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 332new ResourceSnapshot { Name = "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 450new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 451new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 507new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 508new ResourceSnapshot { Name = "webfrontend", DisplayName = "webfrontend", ResourceType = "Project", State = "Running" }, 565new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 566new ResourceSnapshot { Name = "apiservice-abc", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 567new ResourceSnapshot { Name = "apiservice-def", DisplayName = "apiservice", ResourceType = "Project", State = "Running" }, 615new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 616new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 617new ResourceSnapshot { Name = "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true }, 659new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 660new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 703new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 704new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 745new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 781new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 824new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 825new ResourceSnapshot { Name = "apiservice", DisplayName = "apiservice", ResourceType = "Project", State = "Running" },
Commands\LogsCommandTests.cs (12)
735Name = "redis", 742Name = "aspire-dashboard", 825Name = "redis", 856Name = "redis", 866Name = "redis", 873Name = "late-hidden", 992Name = "redis", 999Name = "aspire-dashboard", 1556Name = "redis", 1564Name = "apiservice-abc123", 1571Name = "apiservice-def456", 1635Name = "late-hidden",
Commands\ResourceCommandTests.cs (1)
2311Name = name,
Commands\TerminalCommandTests.cs (1)
648Name = name,
Mcp\ExcludeFromMcpTests.cs (15)
30Name = "test", 42Name = "test", 57Name = "test", 72Name = "test", 87Name = "test", 107Name = ApiServiceName, 114Name = SecretServiceName, 147Name = SecretServiceName, 179Name = SecretServiceName, 217Name = ApiServiceName, 251Name = SecretServiceName, 390Name = ApiServiceName, 397Name = SecretServiceName, 438Name = ApiServiceName, 445Name = SecretServiceName,
Mcp\ListResourcesToolTests.cs (5)
60Name = "api-service", 67Name = "redis", 74Name = "postgres", 106Name = "api-service", 145Name = "api-service",
56 references to Name
aspire (43)
Backchannel\AppHostAuxiliaryBackchannel.cs (4)
367return snapshots.OrderBy(s => s.Name, StringComparer.OrdinalIgnoreCase).ToList(); 389return snapshots.OrderBy(s => s.Name, StringComparer.OrdinalIgnoreCase).ToList(); 622snapshots = snapshots.Where(s => s.Name.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList(); 662if (!string.IsNullOrEmpty(filter) && !snapshot.Name.Contains(filter, StringComparison.OrdinalIgnoreCase))
Backchannel\ResourceSnapshotMapper.cs (10)
20/// <see cref="ResourceSnapshot.Name"/> and <see cref="ResourceSnapshot.DisplayName"/>. 24return snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName) 106ResourceName = match.Name 143var resourcePath = DashboardUrls.ResourcesUrl(snapshot.Name); 149Name = snapshot.Name, 292/// First tries an exact match on <see cref="ResourceSnapshot.Name"/>, then falls back 302var exactMatches = snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparison.OrdinalIgnoreCase)).ToList(); 356return resource.Name; 361return resource.DisplayName ?? resource.Name; 393: new HashSet<string>(allSnapshots.Where(IsHiddenResource).Select(s => s.Name), StringComparers.ResourceName);
Backchannel\ResourceSnapshotWatcher.cs (10)
79_resources[snapshot.Name] = snapshot; 124if (!_resources.TryGetValue(snapshot.Name, out var currentSnapshot) || 127_resources[snapshot.Name] = snapshot; 158_resources.TryGetValue(snapshot.Name, out var currentSnapshot) && 170_resources[snapshot.Name] = snapshot; 174if (_pendingUpdates.ContainsKey(snapshot.Name) || _pendingUpdates.Count < UpdateBufferCapacity) 176_pendingUpdates[snapshot.Name] = update; 195snapshot.Name, 246.OrderBy(update => update.Snapshot.Name, StringComparer.OrdinalIgnoreCase) 342.OrderBy(snapshot => snapshot.Name, StringComparer.OrdinalIgnoreCase)
Commands\DescribeCommand.cs (10)
250if (!resolved.Any(r => string.Equals(r.Name, snapshot.Name, StringComparison.OrdinalIgnoreCase))) 268if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue is string lastJson && lastJson == json) 273lastDisplayedContent[snapshot.Name] = json; 280if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue.Equals(displayState)) 285lastDisplayedContent[snapshot.Name] = displayState; 293.Select((snapshot, index) => (snapshot.Name, index)) 306if (snapshotIndexes.TryGetValue(snapshot.Name, out var index)) 317snapshotIndexes.Add(snapshot.Name, currentSnapshots.Count); 366var resourceUrl = DashboardUrls.CombineUrl(dashboardBaseUrl, DashboardUrls.ResourcesUrl(resource: snapshot.Name));
Commands\ExportCommand.cs (3)
235? new HashSet<string>(ResourceSnapshotMapper.WhereMatchesResourceName(snapshots, resourceName).Select(s => s.Name), StringComparers.ResourceName) 240if (matchingNames is not null && !matchingNames.Contains(snapshot.Name)) 278var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.Name, name, StringComparisons.ResourceName));
Commands\LogsCommand.cs (1)
500var snapshot = snapshots.FirstOrDefault(s => string.Equals(s.Name, resourceName, StringComparisons.ResourceName));
Commands\McpToolsCommand.cs (2)
77var resourceName = r.DisplayName ?? r.Name; 103var resourceName = resource.DisplayName ?? resource.Name;
Commands\TerminalAttachCommand.cs (1)
128: matches[0].Name;
Mcp\McpResourceToolRefreshService.cs (1)
102var routedResourceName = resource.DisplayName ?? resource.Name;
Mcp\Tools\McpToolHelpers.cs (1)
220excludedNames.Add(snapshot.Name);
Aspire.Cli.Tests (13)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (2)
27Assert.Equal("api", snapshot.Name); 46Assert.Equal("api", resource.Name);
Backchannel\ResourceSnapshotMapperTests.cs (3)
410Assert.Equal("cache-zuyppzgw", result[0].Name); 425Assert.Equal("cache-zuyppzgw", result[0].Name); 456Assert.Equal("cache-abc12345", result[0].Name);
Backchannel\ResourceSnapshotWatcherTests.cs (3)
434.Select(update => new { update.Name, update.DisplayName, update.State }) 517snapshot.Name, 532Assert.Same(firstSnapshot, watcher.GetResource(firstSnapshot.Name));
Commands\DescribeCommandTests.cs (5)
340Name = initialSnapshots[0].Name, 347Name = initialSnapshots[^1].Name, 392var expectedStates = changedSnapshots.Any(changed => StringComparers.ResourceName.Equals(changed.Name, snapshot.Name)) 395Assert.Equal(expectedStates, resourcesByName[snapshot.Name]);