24 writes to Urls
Aspire.Hosting (7)
Dcp\ResourceSnapshotBuilder.cs (3)
69Urls = urls, 198Urls = urls, 220Urls = urls,
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
62Urls = transformedUrls.ToImmutableArray()
ExternalServiceBuilderExtensions.cs (1)
174Urls = AddUrlIfNotPresent(snapshot.Urls, uri),
Orchestrator\ApplicationOrchestrator.cs (2)
215await _notificationService.PublishUpdateAsync(resource, s => s with { Urls = [.. urls] }).ConfigureAwait(false); 724Urls = [.. urls],
Aspire.Hosting.Azure (5)
AzureProvisioningController.cs (2)
1203Urls = [], 4182Urls = state.Text == KnownResourceStates.NotStarted ? [] : existingState.Urls,
Provisioning\Provisioners\BicepProvisioner.cs (3)
148Urls = [.. portalUrls], 336Urls = [.. state.Urls.Where(static url => !string.Equals(url.Name, DeploymentUrlName, StringComparison.Ordinal)), new(Name: DeploymentUrlName, Url: deploymentUrl, IsInternal: false)], 693Urls = [.. state.Urls, new(Name: DeploymentUrlName, Url: url, IsInternal: false)],
Aspire.Hosting.Azure.Functions (1)
DurableTask\DurableTaskResourceExtensions.cs (1)
245Urls = url is not null
Aspire.Hosting.Azure.Tests (3)
AzureEnvironmentResourceExtensionsTests.cs (3)
342Urls = 2101Urls = [new("deployment", "https://portal.azure.com/storage", false)], 2108Urls = [new("deployment", "https://portal.azure.com/storage2", false)],
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
422Urls = clientUrls
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
769Urls = [.. snapshot.Urls.Select(u => u with 827Urls = [.. snapshot.Urls.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Foundry (1)
PromptAgent\AzurePromptAgentResource.cs (1)
370Urls = portalUrls
Aspire.Hosting.Tests (4)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
186Urls = [
Codespaces\CodespacesUrlRewriterTests.cs (1)
76Urls = [localhostUrlSnapshot]
ResourceNotificationTests.cs (1)
1504Urls =
WithUrlsTests.cs (1)
573Urls = [.. s.Urls.Select(u => u with { IsInactive = false })]
68 references to Urls
Aspire.Hosting (8)
ApplicationModel\CustomResourceSnapshot.cs (2)
200Urls.SequenceEqual(other.Urls) &&
ApplicationModel\ResourceNotificationService.cs (1)
935string.Join(" ", newState.Urls.Select(u => $"{u.Name} = {u.Url}")),
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1097var urls = snapshot.Urls
Dashboard\DashboardServiceData.cs (1)
78Urls = snapshot.Urls,
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (2)
32foreach (var originalUrlSnapshot in resourceEvent.Snapshot.Urls) 57var transformedUrls = from originalUrl in resourceEvent.Snapshot.Urls
ExternalServiceBuilderExtensions.cs (1)
174Urls = AddUrlIfNotPresent(snapshot.Urls, uri),
Aspire.Hosting.Azure (3)
AzureProvisioningController.cs (1)
4182Urls = state.Text == KnownResourceStates.NotStarted ? [] : existingState.Urls,
Provisioning\Provisioners\BicepProvisioner.cs (2)
336Urls = [.. state.Urls.Where(static url => !string.Equals(url.Name, DeploymentUrlName, StringComparison.Ordinal)), new(Name: DeploymentUrlName, Url: deploymentUrl, IsInternal: false)], 693Urls = [.. state.Urls, new(Name: DeploymentUrlName, Url: url, IsInternal: false)],
Aspire.Hosting.Azure.Tests (2)
AzureBicepProvisionerTests.cs (1)
825Assert.Equal(BicepProvisioner.GetDeploymentUrl(new ResourceIdentifier(expectedDeploymentId)), resourceEvent.Snapshot.Urls.Single(u => u.Name == "deployment").Url);
AzureEnvironmentResourceExtensionsTests.cs (1)
386Assert.Empty(storageEvent.Snapshot.Urls);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
769Urls = [.. snapshot.Urls.Select(u => u with 827Urls = [.. snapshot.Urls.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.DevTunnels.Tests (4)
DevTunnelResourceBuilderExtensionsTests.cs (4)
728e.Snapshot.Urls.Any(u => u.Url == tunnelUrl && !u.IsInactive) && 729e.Snapshot.Urls.Any(u => u.Url == inspectUrl && !u.IsInactive), 734Assert.Contains(resourceEvent.Snapshot.Urls, u => u.Url == tunnelUrl && !u.IsInactive); 735Assert.Contains(resourceEvent.Snapshot.Urls, u => u.Url == inspectUrl && !u.IsInactive);
Aspire.Hosting.Redis.Tests (7)
RedisFunctionalTests.cs (7)
124var commanderEndpointUri = new Uri(commanderEvent.Snapshot.Urls.First(u => u.Name == "http").Url); 130e => e.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: false }, 133var managementUrl = redisEvent.Snapshot.Urls.First(u => u.DisplayProperties.DisplayName == "Manage (Commander)"); 171var managementUrl = redisEvent.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)"); 186e => e.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: false }, 191managementUrl = redisEvent.Snapshot.Urls.First(u => u.DisplayProperties.DisplayName == "Manage (Commander)"); 199e => e.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: true },
Aspire.Hosting.Tests (40)
Codespaces\CodespacesUrlRewriterTests.cs (3)
83var match = re.Snapshot.Urls.Length > 0 && re.Snapshot.Urls[0].Url.Contains("app.github.dev"); 89resourceEvent.Snapshot.Urls,
DistributedApplicationTests.cs (12)
262Assert.Collection(notStartedResourceEvent.Snapshot.Urls, u => 268Assert.Collection(dependentResourceEvent.Snapshot.Urls, u => 278Assert.Collection(runningResourceEvent.Snapshot.Urls, u => 286Assert.Collection(dependentResourceRunningEvent.Snapshot.Urls, u => 559Assert.Collection(notStartedResourceEvent.Snapshot.Urls, u => 564Assert.Collection(dependentResourceEvent.Snapshot.Urls, u => 578Assert.Collection(runningResourceEvent.Snapshot.Urls, u => 585Assert.Collection(dependentRunningResourceEvent.Snapshot.Urls, u => 642Assert.Collection(notStartedResourceEvent.Snapshot.Urls, u => 647Assert.Collection(dependentResourceEvent.Snapshot.Urls, u => 663Assert.Collection(runningResourceEvent.Snapshot.Urls, u => 670Assert.Collection(dependentRunningResourceEvent.Snapshot.Urls, u =>
WithUrlsTests.cs (25)
390e => e.Snapshot.Urls.Length == 1).DefaultTimeout(); 394Assert.Single(resourceEvent.Snapshot.Urls, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com"); 415e => e.Snapshot.Urls.Length == 3).DefaultTimeout(); 419Assert.Collection(resourceEvent.Snapshot.Urls, 449&& e.Snapshot.Urls.Length == 2 450&& e.Snapshot.Urls.All(url => !url.IsInactive)).DefaultTimeout(); 454Assert.Equal(2, resourceEvent.Snapshot.Urls.Length); 455Assert.Collection(resourceEvent.Snapshot.Urls, 481if (notification.Resource == servicea.Resource && notification.Snapshot.Urls.Length > 0) 483urlSnapshots.Add(notification.Snapshot.Urls.ToArray()); 484testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.Urls)}"); 488notification.Snapshot.Urls.All(u => !u.IsInactive)) 573Urls = [.. s.Urls.Select(u => u with { IsInactive = false })] 597if (notification.Resource == custom.Resource && notification.Snapshot.Urls.Length > 0) 599urlSnapshots.Add(notification.Snapshot.Urls.ToArray()); 600testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.Urls)}"); 604notification.Snapshot.Urls.All(u => !u.IsInactive)) 674e => e.Snapshot.State == KnownResourceStates.Running && e.Snapshot.Urls.Length == 4).DefaultTimeout(); 678Assert.Collection(resourceEvent.Snapshot.Urls, 1064&& e.Snapshot.Urls.Length == resourceB.Resource.GetEndpoints().ToArray().Length + 1 1065&& e.Snapshot.Urls.All(u => !u.IsInactive), 1077var crossResourceUrl = resourceEvent.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs"); 1118var crossResourceUrl = resourceEvent.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs"); 1130e => e.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs") is { IsInactive: false }, 1139e => e.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs") is { IsInactive: true },
Aspire.Hosting.TestUtilities (2)
Utils\PersistentContainerTestHelpers.cs (2)
133(!includeUrls || evt.Snapshot.Urls.Length > 0); 143? string.Join(Environment.NewLine, resourceEvent.Snapshot.Urls