11 instantiations of BeforeResourceStartedEvent
Aspire.Hosting (1)
Orchestrator\ApplicationOrchestrator.cs (1)
182var 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)
244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
493await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 517await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 538await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (1)
WithUrlsTests.cs (1)
434await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(custom.Resource, 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);
32 references to BeforeResourceStartedEvent
Aspire.Hosting (5)
EventingExtensions.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)
58_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 75private async Task WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent @event, CancellationToken cancellationToken) 182var 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, (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)
161builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
493await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 517await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 538await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (18)
DistributedApplicationTests.cs (2)
619var beforeResourceStartedEvents = Channel.CreateUnbounded<BeforeResourceStartedEvent>(); 620events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (2)
182builder.Eventing.Subscribe<BeforeResourceStartedEvent>(redis.Resource, (e, ct) => 209builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>
WithUrlsTests.cs (14)
63builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 89builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 144builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 169builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 195builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 224builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 248builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 272builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 303builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 627builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 657builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 685builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 716builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) => 747builder.Eventing.Subscribe<BeforeResourceStartedEvent>(projectA.Resource, (e, ct) =>