154 instantiations of BeforeResourceStartedEvent
Aspire.Hosting (3)
ConnectionStringBuilderExtensions.cs (1)
92await @evt.Eventing.PublishAsync(new BeforeResourceStartedEvent(r, @evt.Services), ct).ConfigureAwait(false);
ExternalServiceBuilderExtensions.cs (1)
168await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(e.Resource, e.Services), ct).ConfigureAwait(false);
Orchestrator\ApplicationOrchestrator.cs (1)
292var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider)
Aspire.Hosting.Azure (1)
AzureProvisioningController.cs (1)
4048var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.Azure.EntraId (1)
EntraIdResourceExtensions.cs (1)
217await evt.Eventing.PublishAsync(new BeforeResourceStartedEvent(resource, evt.Services), cancellationToken).ConfigureAwait(false);
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
224await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false);
Aspire.Hosting.DevTunnels.Tests (2)
DevTunnelResourceBuilderExtensionsTests.cs (2)
236await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 278await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout();
Aspire.Hosting.Dotnet.Tests (36)
DotnetProjectBuildCoordinatorTests.cs (32)
84new BeforeResourceStartedEvent(buildResource, app.Services), 122new BeforeResourceStartedEvent(buildResource, app.Services), 166new BeforeResourceStartedEvent(buildResource, app.Services), 183new BeforeResourceStartedEvent(buildResource, app.Services), 228new BeforeResourceStartedEvent(buildResource, app.Services), 247new BeforeResourceStartedEvent(rebuilder, app.Services), 312new BeforeResourceStartedEvent(buildResource, app.Services), 721new BeforeResourceStartedEvent(buildResource, app.Services), 741new BeforeResourceStartedEvent(rebuilder, app.Services), 785new BeforeResourceStartedEvent(rebuilder, app.Services), 889new BeforeResourceStartedEvent(projectBuild, app.Services), 892new BeforeResourceStartedEvent(fileBuild, app.Services), 1731new BeforeResourceStartedEvent(dependent, app.Services), 1780new BeforeResourceStartedEvent(project.Resource, app.Services), 1820new BeforeResourceStartedEvent(project.Resource, app.Services), 1845new BeforeResourceStartedEvent(buildResource, app.Services), 1869new BeforeResourceStartedEvent(project.Resource, app.Services), 1895new BeforeResourceStartedEvent(buildResource, app.Services), 1915new BeforeResourceStartedEvent(buildResource, app.Services), 1935new BeforeResourceStartedEvent(project.Resource, app.Services), 2015new BeforeResourceStartedEvent(buildResource, app.Services), 2074new BeforeResourceStartedEvent(target, app.Services), 2194new BeforeResourceStartedEvent(buildResource, app.Services), 2292new BeforeResourceStartedEvent(project.Resource, app.Services), 2416new BeforeResourceStartedEvent(buildResource, app.Services), 2433new BeforeResourceStartedEvent(buildResource, app.Services), 2645new BeforeResourceStartedEvent(buildResource, app.Services), 2693new BeforeResourceStartedEvent(rebuilder, app.Services), 2762new BeforeResourceStartedEvent(buildResource, app.Services), 2772new BeforeResourceStartedEvent(rebuilder, app.Services), 2898new BeforeResourceStartedEvent(buildResource, app.Services), 2921new BeforeResourceStartedEvent(rebuilder, app.Services),
DotnetProjectPathTests.cs (3)
140new BeforeResourceStartedEvent(resource.Resource, app.Services), 172new BeforeResourceStartedEvent(resource.Resource, app.Services), 296new BeforeResourceStartedEvent(resource.Resource, app.Services),
DotnetProjectResourceTests.cs (1)
511new BeforeResourceStartedEvent(rebuilder, app.Services),
Aspire.Hosting.Java.Tests (16)
AddJavaAppTests.cs (4)
747new BeforeResourceStartedEvent(app.Resource, built.Services), 766new BeforeResourceStartedEvent(app.Resource, built.Services), 793new BeforeResourceStartedEvent(app.Resource, built.Services), 854new BeforeResourceStartedEvent(app.Resource, built.Services),
AddQuarkusAppTests.cs (3)
97new BeforeResourceStartedEvent(app.Resource, application.Services), 114new BeforeResourceStartedEvent(app.Resource, application.Services), 286new BeforeResourceStartedEvent(app.Resource, application.Services),
AddSpringBootAppTests.cs (9)
22new BeforeResourceStartedEvent(app.Resource, application.Services), 39new BeforeResourceStartedEvent(app.Resource, application.Services), 56new BeforeResourceStartedEvent(app.Resource, application.Services), 76new BeforeResourceStartedEvent(runApp.Resource, application.Services), 114new BeforeResourceStartedEvent(app.Resource, application.Services), 137new BeforeResourceStartedEvent(app.Resource, application.Services), 190new BeforeResourceStartedEvent(app.Resource, application.Services), 211new BeforeResourceStartedEvent(runApp.Resource, application.Services), 238new BeforeResourceStartedEvent(app.Resource, application.Services),
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
295new BeforeResourceStartedEvent(kafkaUiResource, app.Services),
Aspire.Hosting.Maui.Tests (54)
MauiBuildQueueTests.cs (40)
58new BeforeResourceStartedEvent(env.Android, env.Services), 78new BeforeResourceStartedEvent(env.Android, env.Services), 91new BeforeResourceStartedEvent(env.Android, env.Services), 98new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 119new BeforeResourceStartedEvent(env.Android, env.Services), 127new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 147new BeforeResourceStartedEvent(env.Android, env.Services), 163new BeforeResourceStartedEvent(env.Android, env.Services), 167new BeforeResourceStartedEvent(env.Android2!, env.Services), 194new BeforeResourceStartedEvent(env.Android, env.Services), 208new BeforeResourceStartedEvent(env.Android, env.Services), 216new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 231new BeforeResourceStartedEvent(env.IOSSimulator, env.Services), 245new BeforeResourceStartedEvent(env.Android, env.Services), 258new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 266new BeforeResourceStartedEvent(env.IOSSimulator, env.Services), 324new BeforeResourceStartedEvent(env.Android, env.Services), 331new BeforeResourceStartedEvent(env.Parent, env.Services), 348new BeforeResourceStartedEvent(env.Android, env.Services), 358new BeforeResourceStartedEvent(env.Android, env.Services), 389new BeforeResourceStartedEvent(android, app.Services), 427new BeforeResourceStartedEvent(android, app.Services), 448new BeforeResourceStartedEvent(env.Android, env.Services), 495new BeforeResourceStartedEvent(env.Android, env.Services), 503new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 534new BeforeResourceStartedEvent(env.Android, env.Services), 565new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 585new BeforeResourceStartedEvent(env.Android, env.Services), 620new BeforeResourceStartedEvent(env.Android, env.Services), 642new BeforeResourceStartedEvent(env.Android, env.Services), 719new BeforeResourceStartedEvent(env.Android, env.Services), 722new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 873new BeforeResourceStartedEvent(env.Android, env.Services), 891new BeforeResourceStartedEvent(env.Android, env.Services), 961new BeforeResourceStartedEvent(env.Android, env.Services), 981new BeforeResourceStartedEvent(env.Android, env.Services), 1068new BeforeResourceStartedEvent(env.Android, env.Services), 1078new BeforeResourceStartedEvent(env.MacCatalyst, env.Services), 1082new BeforeResourceStartedEvent(env.IOSSimulator, env.Services), 1125new BeforeResourceStartedEvent(env.Android, env.Services),
MauiiOSValidationTests.cs (6)
36.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 62.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None) 87.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 108.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None) 127.PublishAsync(new BeforeResourceStartedEvent(device.Resource, app.Services), CancellationToken.None) 146.PublishAsync(new BeforeResourceStartedEvent(simulator.Resource, app.Services), CancellationToken.None)
MauiPlatformExtensionsTests.cs (8)
296.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None) 594await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services), CancellationToken.None).DefaultTimeout(); 1119appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1145appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1175new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), 1226new BeforeResourceStartedEvent(resolutionEventResource, app.Services), 1250new BeforeResourceStartedEvent(resolutionEventResource, app.Services), 1342new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services),
Aspire.Hosting.MongoDB (1)
ReplicaSet\MongoDBReplicaSetBuilderExtensions.cs (1)
128await evt.Eventing.PublishAsync(new BeforeResourceStartedEvent(resource, evt.Services), ct)
Aspire.Hosting.MongoDB.Tests (1)
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
352await eventing.PublishAsync(new BeforeResourceStartedEvent(mongo1.Resource, app.Services));
Aspire.Hosting.MySql.Tests (5)
AddMySqlTests.cs (5)
260await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 291builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 323await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 324await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 424new BeforeResourceStartedEvent(phpMyAdminResource, app.Services),
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
565await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 591await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 612await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (26)
Orchestrator\ApplicationOrchestratorTests.cs (1)
1645await @event.Eventing.PublishAsync(new BeforeResourceStartedEvent(resource, @event.Services), ct);
ProjectRebuilderResourceTests.cs (4)
33new BeforeResourceStartedEvent(rebuilder, app.Services), 37new BeforeResourceStartedEvent(rebuilder, app.Services), 71new BeforeResourceStartedEvent(rebuilder, app.Services), 104new BeforeResourceStartedEvent(rebuilder, app.Services),
ProjectResourceTests.cs (1)
1128new BeforeResourceStartedEvent(appResource.Resource, app.Services),
RequiredCommandAnnotationTests.cs (17)
157await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 174await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 192await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 215await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 242await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 273await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)) 304await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 325await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 326await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 356await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 357await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 391await eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 392await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services)); 416var publishTask = eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 447await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, app.Services)); 474var publishTask1 = eventing.PublishAsync(new BeforeResourceStartedEvent(resource1, app.Services)); 480await eventing.PublishAsync(new BeforeResourceStartedEvent(resource2, app.Services));
WithBindMountTests.cs (2)
199await eventing.PublishAsync(new BeforeResourceStartedEvent(container.Resource, app.Services)); 200await eventing.PublishAsync(new BeforeResourceStartedEvent(container.Resource, app.Services));
WithUrlsTests.cs (1)
91await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(custom, e.Services), EventDispatchBehavior.BlockingSequential, ct);
CustomResources.AppHost (3)
TalkingClockResource.cs (3)
66await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, services), token); 67await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TickHand, services), token); 68await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TockHand, services), token);
45 references to BeforeResourceStartedEvent
Aspire.Hosting (12)
Ats\EventingExports.cs (1)
72internal static IResourceBuilder<T> OnBeforeResourceStarted<T>(this IResourceBuilder<T> builder, Func<BeforeResourceStartedEvent, Task> callback)
Dashboard\DashboardEventHandlers.cs (1)
226eventing.Subscribe<BeforeResourceStartedEvent>(dashboardResource, (@event, _) =>
DistributedApplicationEventingExtensions.cs (2)
93/// Subscribes a callback to the <see cref="BeforeResourceStartedEvent"/> event within the AppHost. 101public static IResourceBuilder<T> OnBeforeResourceStarted<T>(this IResourceBuilder<T> builder, Func<T, BeforeResourceStartedEvent, CancellationToken, Task> callback)
DotnetToolResourceExtensions.cs (1)
100async Task BeforeResourceStarted(T resource, BeforeResourceStartedEvent evt, CancellationToken ct)
Lifecycle\DotnetBuildCommandEventingSubscriber.cs (2)
23eventing.Subscribe<BeforeResourceStartedEvent>(ConfigureMultiThreadedBuildAsync); 28BeforeResourceStartedEvent @event,
Lifecycle\RequiredCommandValidationEventingSubscriber.cs (2)
25eventing.Subscribe<BeforeResourceStartedEvent>(ValidateRequiredCommandsAsync); 29private async Task ValidateRequiredCommandsAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (3)
79_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 116private async Task WaitForInBeforeResourceStartedEvent(BeforeResourceStartedEvent @event, CancellationToken cancellationToken) 292var beforeResourceStartedEvent = new BeforeResourceStartedEvent(context.Resource, _serviceProvider)
Aspire.Hosting.Azure (1)
AzureProvisioningController.cs (1)
4048var beforeResourceStartedEvent = new BeforeResourceStartedEvent(resource.Resource, serviceProvider);
Aspire.Hosting.Azure.EntraId (1)
EntraIdResourceExtensions.cs (1)
222logger.LogError(ex, "A {EventName} subscriber failed.", nameof(BeforeResourceStartedEvent));
Aspire.Hosting.DevTunnels (1)
DevTunnelResourceBuilderExtensions.cs (1)
224await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false);
Aspire.Hosting.Dotnet (4)
DotnetProjectBuildCoordinator.cs (4)
160var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 186var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 241var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 1069var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>(
Aspire.Hosting.Kafka (1)
KafkaBuilderExtensions.cs (1)
135builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(kafkaUi, (e, ct) =>
Aspire.Hosting.Maui (7)
Lifecycle\MauiBuildQueueEventSubscriber.cs (2)
63eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 67private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
MauiOtlpExtensions.cs (1)
127appBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(async (evt, ct) =>
Utilities\MauiAndroidEnvironmentAnnotation.cs (2)
47eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 51private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Utilities\MauiiOSEnvironmentAnnotation.cs (2)
47eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync); 51private async Task OnBeforeResourceStartedAsync(BeforeResourceStartedEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
329builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(phpMyAdminContainer, async (e, ct) =>
Aspire.Hosting.MySql.Tests (4)
AddMySqlTests.cs (4)
260await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 291builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 323await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 324await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
307builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
565await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 591await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 612await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Tests (8)
DistributedApplicationTests.cs (2)
1287var beforeResourceStartedEvents = Channel.CreateUnbounded<BeforeResourceStartedEvent>(); 1288events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
243builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) =>
Orchestrator\ApplicationOrchestratorTests.cs (4)
981applicationEventing.Subscribe<BeforeResourceStartedEvent>(resource.Resource, (_, _) => 983observedEvents.Add(nameof(BeforeResourceStartedEvent)); 996eventName => Assert.Equal(nameof(BeforeResourceStartedEvent), eventName)); 1630/// <see cref="KnownResourceStates.NotStarted"/> and publishes <see cref="BeforeResourceStartedEvent"/> itself
WithBindMountTests.cs (1)
191builder.Eventing.Subscribe<BeforeResourceStartedEvent>(container.Resource, (_, _) =>
MySqlDb.AppHost (1)
AppHost.cs (1)
14builder.Eventing.Subscribe<BeforeResourceStartedEvent>(mySql.Resource, (_, _) =>