42 instantiations of ResourceEndpointsAllocatedEvent
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
250
endpointEvents.Add(new
ResourceEndpointsAllocatedEvent
(resource, _executionContext.Services));
Aspire.Hosting.Azure.EntraId.Tests (9)
EntraIdProvisioningTests.cs (9)
1172
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1286
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1313
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1338
var publish = builder.Eventing.PublishResourceEndpointsAllocatedAsync(
new
(web.Resource, app.Services), cts.Token);
1381
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(
new
(web.Resource, app.Services), CancellationToken.None);
1399
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1457
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1490
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
1511
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(web.Resource, app.Services), CancellationToken.None);
Aspire.Hosting.DevTunnels (1)
DevTunnelMonitor.cs (1)
633
await _eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(port, _services), cancellationToken)
Aspire.Hosting.Maui (2)
MauiOtlpExtensions.cs (2)
209
appBuilder.Eventing.PublishAsync(new
ResourceEndpointsAllocatedEvent
(stubResource, evt.Services), ct));
524
await eventing.PublishAsync(new
ResourceEndpointsAllocatedEvent
(tunnelConfig.OtlpStub, services), cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Maui.Tests (6)
MauiPlatformExtensionsTests.cs (6)
775
await appBuilder.Eventing.PublishAsync(new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout();
832
new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services),
844
new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services),
892
new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services),
942
new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services),
999
await appBuilder.Eventing.PublishAsync(new
ResourceEndpointsAllocatedEvent
(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout();
Aspire.Hosting.Tests (23)
HealthCheckTests.cs (1)
97
await eventing.PublishAsync(new
ResourceEndpointsAllocatedEvent
(resource.Resource, app.Services));
Orchestrator\ApplicationOrchestratorTests.cs (21)
50
[
new
(first.Resource, app.Services),
new
(second.Resource, app.Services)],
84
[
new
(first.Resource, app.Services),
new
(second.Resource, app.Services)],
120
await orchestrator.PublishEndpointsAllocatedAsync([
new
(first.Resource, app.Services)],
127
await orchestrator.PublishEndpointsAllocatedAsync([
new
(second.Resource, app.Services)],
150
await orchestrator.PublishEndpointsAllocatedAsync([
new
(resource.Resource, app.Services)],
154
await orchestrator.PublishEndpointsAllocatedAsync([
new
(other.Resource, app.Services)],
186
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(
new
(frontend.Resource, app.Services), default);
212
await builder.Eventing.PublishResourceEndpointsAllocatedAsync(
new
(frontend.Resource, app.Services), default);
256
[
new
(frontend.Resource, app.Services)], builder.Eventing, dispatchBehavior, cts.Token);
317
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
359
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
360
await orchestrator.PublishEndpointsAllocatedAsync([
new
(manager.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
387
var publish = orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
423
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
445
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout();
471
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
492
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
520
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
524
await orchestrator.PublishEndpointsAllocatedAsync([
new
(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default);
WithUrlsTests.cs (1)
88
await e.Eventing.PublishResourceEndpointsAllocatedAsync(new
ResourceEndpointsAllocatedEvent
(custom, e.Services), EventDispatchBehavior.BlockingConcurrent, ct);
30 references to ResourceEndpointsAllocatedEvent
Aspire.Hosting (17)
ApplicationModel\ResourceEndpointsAllocatedEvent.cs (1)
16
/// <see cref="DistributedApplicationEventingExtensions.PublishResourceEndpointsAllocatedAsync(IDistributedApplicationEventing,
ResourceEndpointsAllocatedEvent
, CancellationToken)"/>
Ats\EventingExports.cs (1)
136
internal static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<
ResourceEndpointsAllocatedEvent
, Task> callback)
Dcp\DcpExecutor.cs (1)
243
var endpointEvents = new List<
ResourceEndpointsAllocatedEvent
>();
Dcp\DcpExecutorEvents.cs (1)
10
internal record OnEndpointsAllocatedContext(CancellationToken CancellationToken, IReadOnlyList<
ResourceEndpointsAllocatedEvent
> Events);
Devcontainers\DevcontainerPortForwardingEventingSubscriber.cs (2)
31
public Task OnResourceEndpointsAllocatedAsync(
ResourceEndpointsAllocatedEvent
@event, CancellationToken cancellationToken)
61
eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>(OnResourceEndpointsAllocatedAsync);
DistributedApplication.cs (1)
650
logger.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 (4)
30
public static Task PublishResourceEndpointsAllocatedAsync(this IDistributedApplicationEventing eventing,
ResourceEndpointsAllocatedEvent
@event, CancellationToken cancellationToken) =>
47
public static Task PublishResourceEndpointsAllocatedAsync(this IDistributedApplicationEventing eventing,
ResourceEndpointsAllocatedEvent
@event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken)
145
/// Subscribes a callback to the <see cref="
ResourceEndpointsAllocatedEvent
"/> event for <paramref name="builder"/>.
153
public static IResourceBuilder<T> OnResourceEndpointsAllocated<T>(this IResourceBuilder<T> builder, Func<T,
ResourceEndpointsAllocatedEvent
, CancellationToken, Task> callback)
Orchestrator\ApplicationOrchestrator.cs (3)
205
IReadOnlyList<
ResourceEndpointsAllocatedEvent
> events,
212
foreach (
var
endpointEvent in events)
217
foreach (
var
endpointEvent in events)
ResourceBuilderExtensions.cs (3)
2251
/// <see cref="
ResourceEndpointsAllocatedEvent
"/> handlers run.<br/>
2316
/// <see cref="
ResourceEndpointsAllocatedEvent
"/> handlers run.<br/>
2484
/// but before <see cref="
ResourceEndpointsAllocatedEvent
"/> handlers run.<br/>
Aspire.Hosting.DevTunnels.Tests (5)
DevTunnelMonitorTests.cs (5)
113
test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<
ResourceEndpointsAllocatedEvent
>(test.Port, async (_, ct) =>
278
.Subscribe<
ResourceEndpointsAllocatedEvent
>(test.Port, async (_, ct) =>
316
test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<
ResourceEndpointsAllocatedEvent
>(test.Port,
756
test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<
ResourceEndpointsAllocatedEvent
>(test.Port, async (_, ct) =>
777
test.App.Services.GetRequiredService<IDistributedApplicationEventing>().Subscribe<
ResourceEndpointsAllocatedEvent
>(test.Port, (_, _) =>
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
192
appBuilder.Eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>(async (evt, ct) =>
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
977
appBuilder.Eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>((evt, _) =>
Aspire.Hosting.Tests (6)
Dcp\DcpExecutorTests.cs (5)
4959
eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>((@event, ct) =>
4963
observedEvents.Enqueue(nameof(
ResourceEndpointsAllocatedEvent
));
5019
eventName => Assert.Equal(nameof(
ResourceEndpointsAllocatedEvent
), eventName),
5212
builder.Eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>(async (@event, ct) =>
5245
eventing.Subscribe<
ResourceEndpointsAllocatedEvent
>(async (@event, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
323
w.Message?.Contains(nameof(
ResourceEndpointsAllocatedEvent
), StringComparison.Ordinal) == true);