18 instantiations of BeforeResourceStartedEvent
Aspire.Hosting (3)
ConnectionStringBuilderExtensions.cs (1)
92await @evt.Eventing.PublishAsync(new BeforeResourceStartedEvent(r, @evt.Services), ct).ConfigureAwait(false);
ExternalServiceBuilderExtensions.cs (1)
144await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(e.Resource, e.Services), ct).ConfigureAwait(false);
Orchestrator\ApplicationOrchestrator.cs (1)
196var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
189var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
202await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false); 610await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, services), EventDispatchBehavior.NonBlockingSequential, ct).ConfigureAwait(false);
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
217new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
250.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None);
Aspire.Hosting.MySql.Tests (3)
AddMySqlTests.cs (3)
244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 385new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
501await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 527await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 548await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (1)
WithUrlsTests.cs (1)
525await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(custom, e.Services), EventDispatchBehavior.BlockingSequential, ct);
CustomResources.AppHost (3)
TalkingClockResource.cs (3)
65await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, services), token); 66await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TickHand, services), token); 67await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TockHand, services), token);
23 references to BeforeResourceStartedEvent
Aspire.Hosting (5)
DistributedApplicationEventingExtensions.cs (2)
15/// Subscribes a callback to the <see cref="BeforeResourceStartedEvent"/> event within the AppHost. 21public static IResourceBuilder<T> OnBeforeResourceStarted<T>(this IResourceBuilder<T> builder, Func<T, BeforeResourceStartedEvent, CancellationToken, Task> callback)
Orchestrator\ApplicationOrchestrator.cs (3)
72_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 89private async Task WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent @event, CancellationToken cancellationToken) 196var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
189var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
202await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false); 610await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, services), EventDispatchBehavior.NonBlockingSequential, ct).ConfigureAwait(false);
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
113builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(kafkaUi, (e, ct) =>
Aspire.Hosting.Maui (4)
Utilities\MauiAndroidEnvironmentAnnotation.cs (2)
45eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 49private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Utilities\MauiiOSEnvironmentAnnotation.cs (2)
45eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 49private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
236builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(phpMyAdminContainer, async (e, ct) =>
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
248builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
501await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 527await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 548await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (2)
929var beforeResourceStartedEvents = Channel.CreateUnbounded<BeforeResourceStartedEvent>(); 930events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
207builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>