12 instantiations of ResourceEndpointsAllocatedEvent
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
1431var ev = new ResourceEndpointsAllocatedEvent(resource, _executionContext.Services);
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
757await eventing.PublishAsync<ResourceEndpointsAllocatedEvent>(new(portResource, services), ct).ConfigureAwait(false);
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)
565await e.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(custom, e.Services), EventDispatchBehavior.BlockingConcurrent, ct);
17 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)
1431var 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); 575private async Task OnResourceEndpointsAllocated(ResourceEndpointsAllocatedEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
757await eventing.PublishAsync<ResourceEndpointsAllocatedEvent>(new(portResource, services), ct).ConfigureAwait(false);
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)
3861eventing.Subscribe<ResourceEndpointsAllocatedEvent>((@event, ct) => 3865observedEvents.Enqueue(nameof(ResourceEndpointsAllocatedEvent)); 3917eventName => Assert.Equal(nameof(ResourceEndpointsAllocatedEvent), eventName), 4099eventing.Subscribe<ResourceEndpointsAllocatedEvent>(async (@event, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
291w.Message?.Contains(nameof(ResourceEndpointsAllocatedEvent), StringComparison.Ordinal) == true);