12 instantiations of BeforeResourceStartedEvent
Aspire.Hosting (2)
ExternalServiceBuilderExtensions.cs (1)
144await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(e.Resource, e.Services), ct).ConfigureAwait(false);
Orchestrator\ApplicationOrchestrator.cs (1)
186var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
201var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
243await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 274builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
496await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 522await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 543await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (1)
WithUrlsTests.cs (1)
471await 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);
17 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)
61_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 79private async Task WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent @event, CancellationToken cancellationToken) 186var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider);
Aspire.Hosting.Azure (1)
Provisioning\Provisioners\AzureProvisioner.cs (1)
201var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
112builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(kafkaUi, (e, ct) =>
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
208builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(phpMyAdminContainer, async (e, ct) =>
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
243await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 274builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
161builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
496await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 522await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 543await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (2)
618var beforeResourceStartedEvents = Channel.CreateUnbounded<BeforeResourceStartedEvent>(); 619events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
207builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>