294 writes to Name
Aspire.Cli.Tests (294)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (1)
242Name = "api",
Backchannel\ResourceSnapshotMapperTests.cs (26)
56Name = "mauiapp-android-emulator", 88Name = "frontend", 184Name = "frontend", 208Name = "frontend", 234Name = "parameter", 262Name = "parameter", 289Name = "frontend", 332Name = "frontend", 361Name = "messaging-abcxyz", 369Name = "frontend", 387Name = "frontend", 419Name = "messaging-abcxyz", 426Name = "messaging-defuvw", 434Name = "frontend", 452new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 453new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 467new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 468new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 482new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 483new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 484new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 497new() { Name = "cache-abc12345", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 498new() { Name = "cache-def67890", DisplayName = "cache", ResourceType = "Container", State = "Running" }, 499new() { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" } 513new() { Name = "cache-zuyppzgw", DisplayName = "cache", ResourceType = "Container", State = "Running" } 526new() { Name = "Cache-Zuyppzgw", DisplayName = "Cache", ResourceType = "Container", State = "Running" }
Backchannel\ResourceSnapshotWatcherTests.cs (12)
201Name = "api", 213Name = "api", 246Name = "api", 259Name = "api", 293Name = "api", 306Name = "api", 340Name = "api", 352Name = "api", 362Name = "api", 487Name = $"resource-{resourceIndex}", 558Name = "resource-0", 584Name = $"resource-{resourceIndex}",
Backchannel\TrayResourceHealthTests.cs (13)
36Name = "resource", 55Name = "api", 73new() { Name = "hidden-state", State = "Hidden", HealthStatus = "Unhealthy" }, 74new() { Name = "hidden-flag", State = "FailedToStart", IsHidden = true }, 75new() { Name = "parameter", ResourceType = "Parameter", State = "Active" }, 76new() { Name = "connection", ResourceType = "ConnectionString" }, 77new() { Name = "setup", State = "Finished", ExitCode = 0 } 83[.. resources, new() { Name = "api", State = "Running", HealthStatus = "Healthy" }])); 91new() { Name = "api", State = "Running", HealthStatus = "Healthy" }, 95Name = "generator", State = "NotStarted", HealthStatus = "Unhealthy", 111new() { Name = "api", State = "Running", HealthStatus = "Healthy" }, 112new() { Name = "worker", State = "Waiting" }, 113new() { Name = "database", State = "Running", HealthStatus = "Unhealthy" }
Backchannel\TrayWatchStreamTests.cs (17)
732new() { Name = "api", State = "Starting", Version = 1 }, 733new() { Name = "cache", State = "Running", HealthStatus = "Healthy", Version = 1 } 758resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running", HealthStatus = "Healthy", Version = 2 }); 761resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Degraded", Version = 2 }); 764resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Unhealthy", Version = 3 }); 767resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "Running", HealthStatus = "Healthy", Version = 4 }); 770resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running", HealthStatus = "Unhealthy", Version = 1 }); 771resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "FailedToStart", Version = 5 }); 774resourceUpdates.Writer.TryWrite(new() { Name = "cache", State = "FailedToStart", IsHidden = true, Version = 6 }); 825? [new() { Name = "api", State = "Running", IsHidden = true }] 842resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running" }); 845resourceUpdates.Writer.TryWrite(new() { Name = "api", State = "Running", IsHidden = true }); 874connection.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }]; 915initial.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }]; 918replacement.ResourceSnapshots = [new() { Name = "api", State = "Waiting" }]; 981initial.ResourceSnapshots = [new() { Name = "api", State = "Running", HealthStatus = "Healthy" }]; 984replacement.ResourceSnapshots = [new() { Name = "api", State = "Waiting" }];
Commands\AgentMcpCommandTests.cs (14)
239Name = "test-resource-abcd1234", 303Name = "annotated-resource-runtime", 380Name = "my-resource-abcd1234", 513Name = "db1-mcp-ypnvhwvw", 664Name = "unrelated-db-xyz", 709Name = "pinned-db-xyz", 806Name = "unrelated", 835Name = "api", 927Name = "pinned-db-xyz", 1125Name = "pinned-db-xyz", 1206Name = "db-mcp-abcd1234", 1408Name = "db-mcp-xyz", 1837Name = $"{displayName}-runtime", 1952Name = "contract-resource-runtime",
Commands\DescribeCommandTests.cs (66)
38var snapshot = new ResourceSnapshot { Name = "resource", State = state, ExitCode = exitCode }; 52new() { Name = "running", ResourceType = "Project", State = "Running", HealthStatus = "Healthy" }, 53new() { Name = "finished-positive", ResourceType = "Project", State = "Finished", ExitCode = 1 }, 54new() { Name = "finished-negative", ResourceType = "Project", State = "Finished", ExitCode = -532462766 }, 55new() { Name = "finished-zero", ResourceType = "Project", State = "Finished", ExitCode = 0 }, 56new() { Name = "finished-unknown", ResourceType = "Project", State = "Finished" }, 57new() { Name = "exited-positive", ResourceType = "Container", State = "Exited", ExitCode = 1 }, 58new() { Name = "exited-negative", ResourceType = "Container", State = "Exited", ExitCode = -532462766 }, 59new() { Name = "exited-zero", ResourceType = "Container", State = "Exited", ExitCode = 0 }, 60new() { Name = "exited-unknown", ResourceType = "Container", State = "Exited" } 78new() { Name = "api", ResourceType = "Project", State = "Finished", ExitCode = -532462766 } 103new() { Name = "api", ResourceType = "Project", State = "Finished", ExitCode = -532462766 } 122new ResourceSnapshot { Name = "cache", ResourceType = "Container", ResourceTypeDisplayName = "Redis", State = "Running" }, 123new ResourceSnapshot { Name = "postgres", ResourceType = "Container", ResourceTypeDisplayName = "PostgreSQL Server", State = "Running" }, 124new ResourceSnapshot { Name = "orders", ResourceType = "Project", ResourceTypeDisplayName = "ASP.NET Core", State = "Running" }, 125new ResourceSnapshot { Name = "generic", ResourceType = "Container", State = "Running" } 499new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 507new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 509new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 511new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 553Name = $"resource-{index}", 563Name = initialSnapshots[0].Name, 570Name = initialSnapshots[^1].Name, 631new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 667new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 668new ResourceSnapshot { Name = "postgres", DisplayName = "postgres", ResourceType = "Container", State = "Running" }, 669new ResourceSnapshot { Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running" }, 696Name = "redis", 760new ResourceSnapshot { Name = "redis", Version = 1, DisplayName = "redis", ResourceType = "Container", State = "Starting" }, 799new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 808new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 810new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 812new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Stopping" }, 843new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 873new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 897new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 925new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 955Name = "postgres", 995new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1026new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1027new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 1028new ResourceSnapshot { Name = "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true }, 1052new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1053new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 1054new ResourceSnapshot { Name = "hidden-svc", DisplayName = "hidden-svc", ResourceType = "Project", State = "Running", IsHidden = true }, 1080new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1081new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 1105new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1106new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 1133new ResourceSnapshot { Name = "redis", DisplayName = "redis", ResourceType = "Container", State = "Running" }, 1134new ResourceSnapshot { Name = "aspire-dashboard", DisplayName = "aspire-dashboard", ResourceType = "Executable", State = "Hidden" }, 1165Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running", 1178new ResourceSnapshot { Name = "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" }, 1179new ResourceSnapshot { Name = "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" }, 1180new ResourceSnapshot { Name = "cache", DisplayName = "cache", ResourceType = "Container", State = "Running", IsHidden = true }, 1181new ResourceSnapshot { Name = "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" } 1200Name = "end", DisplayName = "api\" # & <b> \\ `\nnext", ResourceType = "Project", State = "Running", 1222Name = "frontend", DisplayName = "frontend", ResourceType = "Project", State = "Running", 1225new ResourceSnapshot { Name = "api-2", DisplayName = "api", ResourceType = "Project", State = "Running" }, 1226new ResourceSnapshot { Name = "api-1", DisplayName = "api", ResourceType = "Project", State = "Running" } 1243new ResourceSnapshot { Name = "cache", DisplayName = "cache", ResourceType = "Container", State = "Hidden" }, 1244new ResourceSnapshot { Name = "connection", DisplayName = "connection", ResourceType = "Parameter", State = "Running" } 1275new ResourceSnapshot { Name = "cache", DisplayName = "cache", ResourceType = "Container", State = "Running" } 1402Name = "redis", 1468Name = "redis", 1481Name = "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)
2351Name = name,
Commands\TerminalCommandTests.cs (1)
822Name = name,
Commands\TerminalResourceResolverTests.cs (17)
27new() { Name = "shell-def456", DisplayName = "shell" }, 28new() { Name = "shell-abc123", DisplayName = "shell" } 53new() { Name = "shell-abc123", DisplayName = "shell", Properties = Properties(replicaIndex) } 83new() { Name = "shell-abc123", DisplayName = "shell", Properties = Properties("0") }, 84new() { Name = "shell-def456", DisplayName = "shell", Properties = Properties("1") } 108new() { Name = "other-abc123", DisplayName = "shell-def456", Properties = Properties("0") }, 109new() { Name = "shell-def456", DisplayName = "shell", Properties = Properties("1") } 144new() { Name = "shell-abc123", DisplayName = "shell" }, 145new() { Name = "shell-def456", DisplayName = "shell" } 177new() { Name = "shell-abc123", DisplayName = "shell" }, 178new() { Name = "shell-def456", DisplayName = "shell" } 214new() { Name = "shell-def456", DisplayName = "shell", Properties = Properties(replicaIndex) } 250Name = "shell-def456", 279new() { Name = "shell-abc123", DisplayName = "shell" }, 280new() { Name = "shell-def456", DisplayName = "shell" } 306new() { Name = "shell-abc123", DisplayName = "shell", Properties = Properties("0") } 336ResourceSnapshots = hasOtherInstances ? [new() { Name = "shell-abc123", DisplayName = "shell" }] : [],
Commands\TerminalTapePlayCommandTests.cs (7)
135new() { Name = "shell-abc123", DisplayName = "shell" }, 136new() { Name = "shell-def456", DisplayName = "shell" } 172new() { Name = "shell-def456", DisplayName = "shell" }, 173new() { Name = "shell-abc123", DisplayName = "shell" } 209Name = "shell-abc123", 215Name = "shell-def456", 567new ResourceSnapshot { Name = "shell-0", DisplayName = "shell", ResourceType = "Executable", State = "Running" }
Mcp\ExcludeFromMcpTests.cs (15)
31Name = "test", 43Name = "test", 58Name = "test", 73Name = "test", 88Name = "test", 109Name = ApiServiceName, 125Name = SecretServiceName, 167Name = SecretServiceName, 213Name = SecretServiceName, 251Name = ApiServiceName, 285Name = SecretServiceName, 424Name = ApiServiceName, 431Name = SecretServiceName, 472Name = ApiServiceName, 479Name = SecretServiceName,
Mcp\ListResourcesToolTests.cs (42)
78Name = "api-service", 106Name = "api", 126Name = "redis-instance-1", 133Name = "redis-instance-2", 140Name = "redis-instance-3", 176Name = "api", 191Name = "redis-visible", 198Name = "redis-hidden", 233Name = "api", 241Name = "redis-visible", 248Name = "redis-hidden", 313Name = "api-service", 320Name = "redis", 327Name = "postgres", 391Name = name, 394connection.ResourceSnapshots.Insert(0, new ResourceSnapshot { Name = "hidden", IsHidden = true }); 395connection.ResourceSnapshots.Insert(1, new ResourceSnapshot { Name = "hidden-state", State = "Hidden" }); 398Name = "excluded", 447new ResourceSnapshot { Name = "first" }, 448new ResourceSnapshot { Name = "second" }, 449new ResourceSnapshot { Name = "third" })); 478Name = $"resource-{index:D3}" 482Name = "api", 489snapshots.Add(new ResourceSnapshot { Name = "redis-visible", DisplayName = "Redis" }); 490snapshots.Add(new ResourceSnapshot { Name = "redis-hidden", DisplayName = "Redis", IsHidden = true }); 510Name = "api", 592monitor.AddConnection("hash1", "socket.hash1", CreateConnection(new ResourceSnapshot { Name = "api", Commands = commands })); 641Name = "model", 668Name = name, 728Name = "api-service", 738Name = "worker", 766Name = "project", 777Name = "executable", 788Name = "container", 817Name = "unicode-source", 844Name = "endpoints", 888Name = "api-service", 967Name = "redis-instance", 979Name = "worker", 989Name = "custom", 999Name = "case-mismatched-project", 1057Name = "custom",
Mcp\WaitForResourcesToolTests.cs (24)
91Name = "api", 98Name = "hidden-proxy", 104Name = "secret-store", 157Name = $"resource-{index}", 185Name = resourceName, 219Name = resourceName, 256Name = "hidden-proxy", 262Name = "secret-store", 309Name = "api-runtime", 315Name = "worker-runtime", 364Name = "hidden-runtime", 371Name = "excluded-runtime", 382Name = "replica-a", 388Name = "replica-b", 485Name = name, 540new ResourceSnapshot { Name = "ready", State = "Running" }, 541new ResourceSnapshot { Name = "slow", State = "Starting" }); 570Name = "api", 611new ResourceSnapshot { Name = "api", State = "Starting" }, 612new ResourceSnapshot { Name = "worker", State = "Starting" }, 613new ResourceSnapshot { Name = "database", State = "Starting" }); 693new ResourceSnapshot { Name = "api", State = "Starting" }, 694new ResourceSnapshot { Name = "worker", State = "Starting" }); 775var connection = CreateConnection(new ResourceSnapshot { Name = "api", State = "Starting" });
78 references to Name
aspire (65)
Backchannel\AppHostAuxiliaryBackchannel.cs (4)
412return snapshots.OrderBy(s => s.Name, StringComparer.OrdinalIgnoreCase).ToList(); 434return snapshots.OrderBy(s => s.Name, StringComparer.OrdinalIgnoreCase).ToList(); 667snapshots = snapshots.Where(s => s.Name.Contains(filter, StringComparison.OrdinalIgnoreCase)).ToList(); 707if (!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, 302/// First tries an exact match on <see cref="ResourceSnapshot.Name"/>, then falls back 312var exactMatches = snapshots.Where(s => string.Equals(s.Name, resourceName, StringComparison.OrdinalIgnoreCase)).ToList(); 366return resource.Name; 371return resource.DisplayName ?? resource.Name; 403: new HashSet<string>(allSnapshots.Where(IsHiddenResource).Select(s => s.Name), StringComparers.ResourceName);
Backchannel\ResourceSnapshotWatcher.cs (10)
113_resources[snapshot.Name] = snapshot; 159if (!_resources.TryGetValue(snapshot.Name, out var currentSnapshot) || 162_resources[snapshot.Name] = snapshot; 181_resources.TryGetValue(snapshot.Name, out var currentSnapshot) && 193_resources[snapshot.Name] = snapshot; 197if (_pendingUpdates.ContainsKey(snapshot.Name) || _pendingUpdates.Count < UpdateBufferCapacity) 199_pendingUpdates[snapshot.Name] = update; 218snapshot.Name, 269.OrderBy(update => update.Snapshot.Name, StringComparer.OrdinalIgnoreCase) 365.OrderBy(snapshot => snapshot.Name, StringComparer.OrdinalIgnoreCase)
Commands\DescribeCommand.cs (12)
253r => r.Name, 258.Select(target => target.Name)); 295if (!resolved.Any(r => string.Equals(r.Name, snapshot.Name, StringComparison.OrdinalIgnoreCase))) 313if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue is string lastJson && lastJson == json) 318lastDisplayedContent[snapshot.Name] = json; 325if (lastDisplayedContent.TryGetValue(snapshot.Name, out var lastValue) && lastValue.Equals(displayState)) 330lastDisplayedContent[snapshot.Name] = displayState; 338.Select((snapshot, index) => (snapshot.Name, index)) 351if (snapshotIndexes.TryGetValue(snapshot.Name, out var index)) 362snapshotIndexes.Add(snapshot.Name, currentSnapshots.Count); 411var 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\TerminalResourceResolver.cs (3)
47string.Join(", ", matches.Select(s => s.Name).Order(StringComparers.ResourceName)))); 56: snapshot.Name; 108TerminalCommandStrings.InstanceTerminalUnavailable, snapshot.Name));
Mcp\McpResourceToolRefreshService.cs (1)
106var routedResourceName = resource.DisplayName ?? resource.Name;
Mcp\Tools\ListResourcesTool.cs (13)
190.OrderBy(snapshot => snapshot.Name, StringComparer.Ordinal) 205Name = GetBoundedText(snapshot.Name), 356identities[snapshot.Name] = ( 357hasDuplicateDisplayName ? snapshot.Name : snapshot.DisplayName ?? snapshot.Name, 358snapshot.Name); 370: (displayName, snapshot.Name); 380.Select(snapshot => snapshot.Name) 388targets[snapshot.Name] = [snapshot.Name]; 404if (!displayTargets.Contains(snapshot.Name, StringComparers.ResourceName)) 406displayTargets.Add(snapshot.Name); 497var dashboardUrl = DashboardUrls.CombineUrl(dashboardBaseUrl, DashboardUrls.ResourcesUrl(snapshot.Name));
Mcp\Tools\McpToolHelpers.cs (1)
467excludedNames.Add(snapshot.Name);
Mcp\Tools\WaitForResourcesTool.cs (5)
144.Select(static snapshot => snapshot.Name) 166.DistinctBy(static target => target.Name, StringComparers.ResourceName) 173validTargets.Select(static target => target.Name).ToArray(), 181target.Failure ?? MapWaitResult(waitResultsByName[target.Resource!.Name])).ToArray(); 342string.Equals(snapshot.Name, resourceName, StringComparisons.ResourceName));
Aspire.Cli.Tests (13)
Backchannel\AppHostAuxiliaryBackchannelTests.cs (2)
28Assert.Equal("api", snapshot.Name); 47Assert.Equal("api", resource.Name);
Backchannel\ResourceSnapshotMapperTests.cs (3)
459Assert.Equal("cache-zuyppzgw", result[0].Name); 474Assert.Equal("cache-zuyppzgw", result[0].Name); 505Assert.Equal("cache-abc12345", result[0].Name);
Backchannel\ResourceSnapshotWatcherTests.cs (3)
523.Select(update => new { update.Name, update.DisplayName, update.State }) 606snapshot.Name, 621Assert.Same(firstSnapshot, watcher.GetResource(firstSnapshot.Name));
Commands\DescribeCommandTests.cs (5)
563Name = initialSnapshots[0].Name, 570Name = initialSnapshots[^1].Name, 615var expectedStates = changedSnapshots.Any(changed => StringComparers.ResourceName.Equals(changed.Name, snapshot.Name)) 618Assert.Equal(expectedStates, resourcesByName[snapshot.Name]);