24 writes to Urls
Aspire.Hosting (7)
Dcp\ResourceSnapshotBuilder.cs (3)
69
Urls
= urls,
198
Urls
= urls,
220
Urls
= urls,
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
62
Urls
= transformedUrls.ToImmutableArray()
ExternalServiceBuilderExtensions.cs (1)
174
Urls
= AddUrlIfNotPresent(snapshot.Urls, uri),
Orchestrator\ApplicationOrchestrator.cs (2)
213
await _notificationService.PublishUpdateAsync(resource, s => s with {
Urls
= [.. urls] }).ConfigureAwait(false);
730
Urls
= [.. urls],
Aspire.Hosting.Azure (5)
AzureProvisioningController.cs (2)
1203
Urls
= [],
4182
Urls
= state.Text == KnownResourceStates.NotStarted ? [] : existingState.Urls,
Provisioning\Provisioners\BicepProvisioner.cs (3)
148
Urls
= [.. portalUrls],
336
Urls
= [.. state.Urls.Where(static url => !string.Equals(url.Name, DeploymentUrlName, StringComparison.Ordinal)), new(Name: DeploymentUrlName, Url: deploymentUrl, IsInternal: false)],
693
Urls
= [.. state.Urls, new(Name: DeploymentUrlName, Url: url, IsInternal: false)],
Aspire.Hosting.Azure.Functions (1)
DurableTask\DurableTaskResourceExtensions.cs (1)
239
Urls
= url is not null
Aspire.Hosting.Azure.Tests (3)
AzureEnvironmentResourceExtensionsTests.cs (3)
342
Urls
=
2101
Urls
= [new("deployment", "https://portal.azure.com/storage", false)],
2108
Urls
= [new("deployment", "https://portal.azure.com/storage2", false)],
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
447
Urls
= clientUrls
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
734
Urls
= [.. snapshot.Urls.Select(u => u with
792
Urls
= [.. snapshot.Urls.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Foundry (1)
PromptAgent\AzurePromptAgentResource.cs (1)
370
Urls
= portalUrls
Aspire.Hosting.Tests (4)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
186
Urls
= [
Codespaces\CodespacesUrlRewriterTests.cs (1)
76
Urls
= [localhostUrlSnapshot]
ResourceNotificationTests.cs (1)
1504
Urls
=
WithUrlsTests.cs (1)
572
Urls
= [.. s.Urls.Select(u => u with { IsInactive = false })]
54 references to Urls
Aspire.Hosting (8)
ApplicationModel\CustomResourceSnapshot.cs (2)
200
Urls
.SequenceEqual(other.
Urls
) &&
ApplicationModel\ResourceNotificationService.cs (1)
935
string.Join(" ", newState.
Urls
.Select(u => $"{u.Name} = {u.Url}")),
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
1068
var urls = snapshot.
Urls
Dashboard\DashboardServiceData.cs (1)
78
Urls = snapshot.
Urls
,
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (2)
32
foreach (var originalUrlSnapshot in resourceEvent.Snapshot.
Urls
)
57
var transformedUrls = from originalUrl in resourceEvent.Snapshot.
Urls
ExternalServiceBuilderExtensions.cs (1)
174
Urls = AddUrlIfNotPresent(snapshot.
Urls
, uri),
Aspire.Hosting.Azure (3)
AzureProvisioningController.cs (1)
4182
Urls = state.Text == KnownResourceStates.NotStarted ? [] : existingState.
Urls
,
Provisioning\Provisioners\BicepProvisioner.cs (2)
336
Urls = [.. state.
Urls
.Where(static url => !string.Equals(url.Name, DeploymentUrlName, StringComparison.Ordinal)), new(Name: DeploymentUrlName, Url: deploymentUrl, IsInternal: false)],
693
Urls = [.. state.
Urls
, new(Name: DeploymentUrlName, Url: url, IsInternal: false)],
Aspire.Hosting.Azure.Tests (2)
AzureBicepProvisionerTests.cs (1)
753
Assert.Equal(BicepProvisioner.GetDeploymentUrl(new ResourceIdentifier(expectedDeploymentId)), resourceEvent.Snapshot.
Urls
.Single(u => u.Name == "deployment").Url);
AzureEnvironmentResourceExtensionsTests.cs (1)
386
Assert.Empty(storageEvent.Snapshot.
Urls
);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
734
Urls = [.. snapshot.
Urls
.Select(u => u with
792
Urls = [.. snapshot.
Urls
.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Tests (37)
Codespaces\CodespacesUrlRewriterTests.cs (3)
83
var match = re.Snapshot.
Urls
.Length > 0 && re.Snapshot.
Urls
[0].Url.Contains("app.github.dev");
89
resourceEvent.Snapshot.
Urls
,
DistributedApplicationTests.cs (12)
262
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
268
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
278
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
286
Assert.Collection(dependentResourceRunningEvent.Snapshot.
Urls
, u =>
555
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
560
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
574
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
581
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
638
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
643
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
659
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
666
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
WithUrlsTests.cs (22)
389
e => e.Snapshot.
Urls
.Length == 1).DefaultTimeout();
393
Assert.Single(resourceEvent.Snapshot.
Urls
, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com");
414
e => e.Snapshot.
Urls
.Length == 3).DefaultTimeout();
418
Assert.Collection(resourceEvent.Snapshot.
Urls
,
448
&& e.Snapshot.
Urls
.Length == 2
449
&& e.Snapshot.
Urls
.All(url => !url.IsInactive)).DefaultTimeout();
453
Assert.Equal(2, resourceEvent.Snapshot.
Urls
.Length);
454
Assert.Collection(resourceEvent.Snapshot.
Urls
,
480
if (notification.Resource == servicea.Resource && notification.Snapshot.
Urls
.Length > 0)
482
urlSnapshots.Add(notification.Snapshot.
Urls
.ToArray());
483
testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.
Urls
)}");
487
notification.Snapshot.
Urls
.All(u => !u.IsInactive))
572
Urls = [.. s.
Urls
.Select(u => u with { IsInactive = false })]
596
if (notification.Resource == custom.Resource && notification.Snapshot.
Urls
.Length > 0)
598
urlSnapshots.Add(notification.Snapshot.
Urls
.ToArray());
599
testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.
Urls
)}");
603
notification.Snapshot.
Urls
.All(u => !u.IsInactive))
673
e => e.Snapshot.State == KnownResourceStates.Running && e.Snapshot.
Urls
.Length == 4).DefaultTimeout();
677
Assert.Collection(resourceEvent.Snapshot.
Urls
,
975
&& e.Snapshot.
Urls
.Length == resourceB.Resource.GetEndpoints().ToArray().Length + 1
976
&& e.Snapshot.
Urls
.All(u => !u.IsInactive),
982
var 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