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)
213await _notificationService.PublishUpdateAsync(resource, s => s with { Urls = [.. urls] }).ConfigureAwait(false); 730Urls = [.. 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)
239Urls = 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)
447Urls = clientUrls
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
734Urls = [.. snapshot.Urls.Select(u => u with 792Urls = [.. 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)
572Urls = [.. s.Urls.Select(u => u with { IsInactive = false })]
54 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)
1068var 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)
753Assert.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)
734Urls = [.. snapshot.Urls.Select(u => u with 792Urls = [.. snapshot.Urls.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Tests (37)
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 => 555Assert.Collection(notStartedResourceEvent.Snapshot.Urls, u => 560Assert.Collection(dependentResourceEvent.Snapshot.Urls, u => 574Assert.Collection(runningResourceEvent.Snapshot.Urls, u => 581Assert.Collection(dependentRunningResourceEvent.Snapshot.Urls, u => 638Assert.Collection(notStartedResourceEvent.Snapshot.Urls, u => 643Assert.Collection(dependentResourceEvent.Snapshot.Urls, u => 659Assert.Collection(runningResourceEvent.Snapshot.Urls, u => 666Assert.Collection(dependentRunningResourceEvent.Snapshot.Urls, u =>
WithUrlsTests.cs (22)
389e => e.Snapshot.Urls.Length == 1).DefaultTimeout(); 393Assert.Single(resourceEvent.Snapshot.Urls, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com"); 414e => e.Snapshot.Urls.Length == 3).DefaultTimeout(); 418Assert.Collection(resourceEvent.Snapshot.Urls, 448&& e.Snapshot.Urls.Length == 2 449&& e.Snapshot.Urls.All(url => !url.IsInactive)).DefaultTimeout(); 453Assert.Equal(2, resourceEvent.Snapshot.Urls.Length); 454Assert.Collection(resourceEvent.Snapshot.Urls, 480if (notification.Resource == servicea.Resource && notification.Snapshot.Urls.Length > 0) 482urlSnapshots.Add(notification.Snapshot.Urls.ToArray()); 483testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.Urls)}"); 487notification.Snapshot.Urls.All(u => !u.IsInactive)) 572Urls = [.. s.Urls.Select(u => u with { IsInactive = false })] 596if (notification.Resource == custom.Resource && notification.Snapshot.Urls.Length > 0) 598urlSnapshots.Add(notification.Snapshot.Urls.ToArray()); 599testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.Urls)}"); 603notification.Snapshot.Urls.All(u => !u.IsInactive)) 673e => e.Snapshot.State == KnownResourceStates.Running && e.Snapshot.Urls.Length == 4).DefaultTimeout(); 677Assert.Collection(resourceEvent.Snapshot.Urls, 975&& e.Snapshot.Urls.Length == resourceB.Resource.GetEndpoints().ToArray().Length + 1 976&& e.Snapshot.Urls.All(u => !u.IsInactive), 982var crossResourceUrl = resourceEvent.Snapshot.Urls.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs");
Aspire.Hosting.TestUtilities (2)
Utils\PersistentContainerTestHelpers.cs (2)
133(!includeUrls || evt.Snapshot.Urls.Length > 0); 143? string.Join(Environment.NewLine, resourceEvent.Snapshot.Urls