12 instantiations of ResourceEndpointsAllocatedEvent
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
1425var ev = new ResourceEndpointsAllocatedEvent(resource, _executionContext.Services);
Aspire.Hosting.DevTunnels (1)
DevTunnelMonitor.cs (1)
633await _eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(port, _services), cancellationToken)
Aspire.Hosting.Maui (2)
MauiOtlpExtensions.cs (2)
209appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(stubResource, evt.Services), ct)); 524await eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(tunnelConfig.OtlpStub, services), cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Maui.Tests (6)
MauiPlatformExtensionsTests.cs (6)
776await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout(); 833new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 845new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 893new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 943new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), 1000await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout();
Aspire.Hosting.Tests (2)
HealthCheckTests.cs (1)
97await eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(resource.Resource, app.Services));
WithUrlsTests.cs (1)
584await e.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(custom, e.Services), EventDispatchBehavior.BlockingConcurrent, ct);
20 references to ResourceEndpointsAllocatedEvent
Aspire.Hosting (9)
Ats\EventingExports.cs (1)
136internal static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<ResourceEndpointsAllocatedEvent, Task> callback)
Dcp\DcpExecutor.cs (1)
1425var ev = new ResourceEndpointsAllocatedEvent(resource, _executionContext.Services);
Devcontainers\DevcontainerPortForwardingEventingSubscriber.cs (2)
31public Task OnResourceEndpointsAllocatedAsync(ResourceEndpointsAllocatedEvent @event, CancellationToken cancellationToken) 61eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocatedAsync);
DistributedApplication.cs (1)
639logger.LogWarning("{EventName} is obsolete and is no longer raised by the DCP executor. Use {ResourceEventName} to observe per-resource endpoint allocation.", nameof(AfterEndpointsAllocatedEvent), nameof(ResourceEndpointsAllocatedEvent));
DistributedApplicationEventingExtensions.cs (2)
104/// Subscribes a callback to the <see cref="ResourceEndpointsAllocatedEvent"/> event for <paramref name="builder"/>. 112public static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<T, ResourceEndpointsAllocatedEvent, CancellationToken, Task> callback)
Orchestrator\ApplicationOrchestrator.cs (2)
76_eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocated); 573private async Task OnResourceEndpointsAllocated(ResourceEndpointsAllocatedEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.DevTunnels.Tests (4)
DevTunnelMonitorTests.cs (4)
113test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 256test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, 696test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, async (_, ct) => 717test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<ResourceEndpointsAllocatedEvent>(test.Port, (_, _) =>
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
192appBuilder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>(async (evt, ct) =>
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
978appBuilder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>((evt, _) =>
Aspire.Hosting.Tests (5)
Dcp\DcpExecutorTests.cs (4)
4474eventing.Subscribe<ResourceEndpointsAllocatedEvent>((@event, ct) => 4478observedEvents.Enqueue(nameof(ResourceEndpointsAllocatedEvent)); 4530eventName => Assert.Equal(nameof(ResourceEndpointsAllocatedEvent), eventName), 4712eventing.Subscribe<ResourceEndpointsAllocatedEvent>(async (@event, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
291w.Message?.Contains(nameof(ResourceEndpointsAllocatedEvent), StringComparison.Ordinal) == true);