33 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)
198var 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)
216await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false); 627await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, services), EventDispatchBehavior.NonBlockingSequential, ct).ConfigureAwait(false);
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
218new 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)
519await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 545await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 566await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (16)
RequiredCommandAnnotationTests.cs (15)
156await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 173await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 191await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 214await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 241await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 267await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 288await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 309await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 310await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 342await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 343await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 367var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 398await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 425var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 431await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services));
WithUrlsTests.cs (1)
568await 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);
26 references to BeforeResourceStartedEvent
Aspire.Hosting (8)
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)
DotnetToolResourceExtensions.cs (1)
93async Task BeforeResourceStarted(T resource, BeforeResourceStartedEvent evt, CancellationToken ct)
Lifecycle\RequiredCommandValidationLifecycleHook.cs (2)
27eventing.Subscribe<BeforeResourceStartedEvent>(ValidateRequiredCommandsAsync); 31private async Task ValidateRequiredCommandsAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (3)
76_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 93private async Task WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent @event, CancellationToken cancellationToken) 198var 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)
216await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false); 627await 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)
49eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 53private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Utilities\MauiiOSEnvironmentAnnotation.cs (2)
49eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 53private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
240builder.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)
254builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
519await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 545await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 566await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (2)
1064var beforeResourceStartedEvents = Channel.CreateUnbounded<BeforeResourceStartedEvent>(); 1065events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
207builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>