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)
215
await _notificationService.PublishUpdateAsync(resource, s => s with {
Urls
= [.. urls] }).ConfigureAwait(false);
724
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)
245
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)
422
Urls
= clientUrls
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
769
Urls
= [.. snapshot.Urls.Select(u => u with
827
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)
573
Urls
= [.. s.Urls.Select(u => u with { IsInactive = false })]
68 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)
1097
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)
825
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)
769
Urls = [.. snapshot.
Urls
.Select(u => u with
827
Urls = [.. snapshot.
Urls
.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.DevTunnels.Tests (4)
DevTunnelResourceBuilderExtensionsTests.cs (4)
728
e.Snapshot.
Urls
.Any(u => u.Url == tunnelUrl && !u.IsInactive) &&
729
e.Snapshot.
Urls
.Any(u => u.Url == inspectUrl && !u.IsInactive),
734
Assert.Contains(resourceEvent.Snapshot.
Urls
, u => u.Url == tunnelUrl && !u.IsInactive);
735
Assert.Contains(resourceEvent.Snapshot.
Urls
, u => u.Url == inspectUrl && !u.IsInactive);
Aspire.Hosting.Redis.Tests (7)
RedisFunctionalTests.cs (7)
124
var commanderEndpointUri = new Uri(commanderEvent.Snapshot.
Urls
.First(u => u.Name == "http").Url);
130
e => e.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: false },
133
var managementUrl = redisEvent.Snapshot.
Urls
.First(u => u.DisplayProperties.DisplayName == "Manage (Commander)");
171
var managementUrl = redisEvent.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)");
186
e => e.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: false },
191
managementUrl = redisEvent.Snapshot.
Urls
.First(u => u.DisplayProperties.DisplayName == "Manage (Commander)");
199
e => e.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "Manage (Commander)") is { IsInactive: true },
Aspire.Hosting.Tests (40)
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 =>
559
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
564
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
578
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
585
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
642
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
647
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
663
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
670
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
WithUrlsTests.cs (25)
390
e => e.Snapshot.
Urls
.Length == 1).DefaultTimeout();
394
Assert.Single(resourceEvent.Snapshot.
Urls
, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com");
415
e => e.Snapshot.
Urls
.Length == 3).DefaultTimeout();
419
Assert.Collection(resourceEvent.Snapshot.
Urls
,
449
&& e.Snapshot.
Urls
.Length == 2
450
&& e.Snapshot.
Urls
.All(url => !url.IsInactive)).DefaultTimeout();
454
Assert.Equal(2, resourceEvent.Snapshot.
Urls
.Length);
455
Assert.Collection(resourceEvent.Snapshot.
Urls
,
481
if (notification.Resource == servicea.Resource && notification.Snapshot.
Urls
.Length > 0)
483
urlSnapshots.Add(notification.Snapshot.
Urls
.ToArray());
484
testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.
Urls
)}");
488
notification.Snapshot.
Urls
.All(u => !u.IsInactive))
573
Urls = [.. s.
Urls
.Select(u => u with { IsInactive = false })]
597
if (notification.Resource == custom.Resource && notification.Snapshot.
Urls
.Length > 0)
599
urlSnapshots.Add(notification.Snapshot.
Urls
.ToArray());
600
testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.
Urls
)}");
604
notification.Snapshot.
Urls
.All(u => !u.IsInactive))
674
e => e.Snapshot.State == KnownResourceStates.Running && e.Snapshot.
Urls
.Length == 4).DefaultTimeout();
678
Assert.Collection(resourceEvent.Snapshot.
Urls
,
1064
&& e.Snapshot.
Urls
.Length == resourceB.Resource.GetEndpoints().ToArray().Length + 1
1065
&& e.Snapshot.
Urls
.All(u => !u.IsInactive),
1077
var crossResourceUrl = resourceEvent.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs");
1118
var crossResourceUrl = resourceEvent.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs");
1130
e => e.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs") is { IsInactive: false },
1139
e => 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