13 writes to Urls
Aspire.Hosting (7)
Dcp\ResourceSnapshotBuilder.cs (3)
65
Urls
= urls,
179
Urls
= urls,
201
Urls
= urls,
Devcontainers\Codespaces\CodespacesResourceUrlRewriterService.cs (1)
62
Urls
= transformedUrls.ToImmutableArray()
ExternalServiceBuilderExtensions.cs (1)
150
Urls
= AddUrlIfNotPresent(snapshot.Urls, uri),
Orchestrator\ApplicationOrchestrator.cs (2)
147
await _notificationService.PublishUpdateAsync(resource, s => s with {
Urls
= [.. urls] }).ConfigureAwait(false);
641
Urls
= [.. urls],
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\BicepProvisioner.cs (2)
107
Urls
= [.. portalUrls],
207
Urls
= [.. state.Urls, new(Name: "deployment", Url: url, IsInternal: false)],
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
634
Urls
= [.. snapshot.Urls.Select(u => u with
691
Urls
= [.. snapshot.Urls.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Tests (2)
Codespaces\CodespacesUrlRewriterTests.cs (1)
75
Urls
= [localhostUrlSnapshot]
WithUrlsTests.cs (1)
573
Urls
= [.. s.Urls.Select(u => u with { IsInactive = false })]
43 references to Urls
Aspire.Hosting (5)
ApplicationModel\ResourceNotificationService.cs (1)
666
string.Join(" ", newState.
Urls
.Select(u => $"{u.Name} = {u.Url}")),
Dashboard\DashboardServiceData.cs (1)
50
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)
150
Urls = AddUrlIfNotPresent(snapshot.
Urls
, uri),
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\BicepProvisioner.cs (1)
207
Urls = [.. state.
Urls
, new(Name: "deployment", Url: url, IsInternal: false)],
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
634
Urls = [.. snapshot.
Urls
.Select(u => u with
691
Urls = [.. snapshot.
Urls
.Select(u => u with { IsInactive = true /* All URLs inactive */ })]
Aspire.Hosting.Tests (35)
Codespaces\CodespacesUrlRewriterTests.cs (3)
82
var match = re.Snapshot.
Urls
.Length > 0 && re.Snapshot.
Urls
[0].Url.Contains("app.github.dev");
88
resourceEvent.Snapshot.
Urls
,
DistributedApplicationTests.cs (12)
198
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
204
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
214
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
222
Assert.Collection(dependentResourceRunningEvent.Snapshot.
Urls
, u =>
403
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
408
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
422
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
429
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
486
Assert.Collection(notStartedResourceEvent.Snapshot.
Urls
, u =>
491
Assert.Collection(dependentResourceEvent.Snapshot.
Urls
, u =>
507
Assert.Collection(runningResourceEvent.Snapshot.
Urls
, u =>
514
Assert.Collection(dependentRunningResourceEvent.Snapshot.
Urls
, u =>
WithUrlsTests.cs (20)
387
e => e.Snapshot.
Urls
.Length > 0,
392
Assert.Single(resourceEvent.Snapshot.
Urls
, s => s.Name == httpEndpoint.EndpointName && s.IsInactive && s.Url == "https://example.com");
414
e => e.Snapshot.
Urls
.Length > 0,
419
Assert.Collection(resourceEvent.Snapshot.
Urls
,
452
Assert.Equal(2, resourceEvent.Snapshot.
Urls
.Length);
453
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 })]
599
if (notification.Resource == custom.Resource && notification.Snapshot.
Urls
.Length > 0)
601
urlSnapshots.Add(notification.Snapshot.
Urls
.ToArray());
602
testOutputHelper.WriteLine($"Captured snapshot #{urlSnapshots.Count}: State={notification.Snapshot.State}, URLs: {FormatUrls(notification.Snapshot.
Urls
)}");
606
notification.Snapshot.
Urls
.All(u => !u.IsInactive))
677
e => e.Snapshot.State == KnownResourceStates.Running && e.Snapshot.
Urls
.Length > 1,
682
Assert.Collection(resourceEvent.Snapshot.
Urls
,
980
&& e.Snapshot.
Urls
.Length == resourceB.Resource.GetEndpoints().ToArray().Length + 1
981
&& e.Snapshot.
Urls
.All(u => !u.IsInactive),
987
var crossResourceUrl = resourceEvent.Snapshot.
Urls
.FirstOrDefault(u => u.DisplayProperties.DisplayName == "API Docs");