109 instantiations of BeforeStartEvent
Aspire.Hosting (1)
DistributedApplication.cs (1)
629var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
Aspire.Hosting.Azure.Tests (56)
AzureCosmosDBExtensionsTests.cs (4)
790var beforeStartEvent = new BeforeStartEvent(app.Services, model); 822var beforeStartEvent = new BeforeStartEvent(app.Services, model); 851var beforeStartEvent = new BeforeStartEvent(app.Services, model); 881var beforeStartEvent = new BeforeStartEvent(app.Services, model);
AzureEnvironmentResourceExtensionsTests.cs (52)
655await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 705await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 740await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 787await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 899await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1174await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1232await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1293await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1355await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1411await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1483await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1544await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1603await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1659await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1697await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1764await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1867await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 1939await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2018await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2085await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2163await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2224await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2285await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2364await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2441await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2529await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2586await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2638await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2702await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2776await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2831await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2891await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 2935await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3007await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3074await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3133await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3199await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3263await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3328await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3659await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3700await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3747await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3804await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3841await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3909await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 3989await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4068await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4119await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4166await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4212await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4279await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None); 4794await preparer.OnBeforeStartAsync(new BeforeStartEvent(app.Services, model), CancellationToken.None);
Aspire.Hosting.Blazor.Tests (1)
BlazorHostedExtensionsTests.cs (1)
541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
705await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.JavaScript.Tests (1)
RequiredCommandTests.cs (1)
206await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
80var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
766await appBuilder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), CancellationToken.None);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
2593await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
864var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 902await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 937var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 965var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (40)
ContainerRegistryResourceTests.cs (12)
522var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 543var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 567var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 589var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 612var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 648var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 672var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 702var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 723var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 743var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 764var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 785var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Dashboard\DashboardEventHandlersTests.cs (10)
50await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 100await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 193await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 246await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 449await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 532await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 605await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 688await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 757await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 824await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None);
Dcp\DcpExecutorTests.cs (5)
5910await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 5950await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 9860await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 9931await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 9977await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel));
PersistentContainerWarningTests.cs (3)
34var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 58var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 80var beforeStartEvent = new BeforeStartEvent(serviceProvider, model);
WithOtlpExporterTests.cs (1)
256var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
WithTerminalTests.cs (9)
296await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 374await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 462await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 514await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 910await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 926await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 944await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1274await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1296await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
443var beforeStartEvent = new BeforeStartEvent(app.Services, model); 468var beforeStartEvent = new BeforeStartEvent(app.Services, model);
80 references to BeforeStartEvent
Aspire.Hosting (34)
ApplicationModel\BeforeStartEvent.cs (1)
20/// Subscribe to the <see cref="BeforeStartEvent"/> event and resolve the distributed application model.
ApplicationModel\TerminalAnnotation.cs (4)
27/// <see cref="Initialize"/> from a <see cref="BeforeStartEvent"/> handler so the 46/// parent's replica count at <see cref="BeforeStartEvent"/> time). Empty until 53/// Production code initializes during <see cref="BeforeStartEvent"/>; tests that 60/// <see cref="BeforeStartEvent"/> subscriber installed by
Ats\BuilderExports.cs (2)
204Func<BeforeStartEvent, Task> callback) 209return builder.Eventing.Subscribe<BeforeStartEvent>(async (@event, ct) =>
Ats\EventingExports.cs (2)
168public static DistributedApplicationEventSubscription OnBeforeStart(this EventingSubscriberRegistrationContext context, Func<BeforeStartEvent, Task> callback) 173return context.Eventing.Subscribe<BeforeStartEvent>((@event, _) => callback(@event));
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (5)
16public static Task InitializeDcpAnnotations(BeforeStartEvent beforeStartEvent, CancellationToken _) 45public static Task ExcludeDashboardFromManifestAsync(BeforeStartEvent beforeStartEvent, CancellationToken _) 56public static Task MutateHttp2TransportAsync(BeforeStartEvent beforeStartEvent, CancellationToken _) 71public static Task UpdateContainerRegistryAsync(BeforeStartEvent @event, DistributedApplicationOptions options) 86public static Task WarnPersistentContainersWithoutUserSecrets(BeforeStartEvent beforeStartEvent, CancellationToken _)
Dashboard\DashboardEventHandlers.cs (2)
61public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 1030eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (2)
629var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>()); 630using (var publishEventActivity = ProfilingTelemetry.StartAppHostPublishEvent(configuration, typeof(BeforeStartEvent)))
DistributedApplicationBuilder.cs (5)
588Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 589Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.WarnPersistentContainersWithoutUserSecrets); 593Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 640Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 645Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
DistributedApplicationEventingExtensions.cs (2)
16/// Subscribes a callback to the <see cref="BeforeStartEvent"/> event within the AppHost. 23public static T OnBeforeStart<T>(this T builder, Func<BeforeStartEvent, CancellationToken, Task> callback)
Lifecycle\TerminalHostEventingSubscriber.cs (3)
15/// created earlier in the same <see cref="BeforeStartEvent"/> by the subscription 46eventing.Subscribe<BeforeStartEvent>(ResolveTerminalHostsAsync); 50private Task ResolveTerminalHostsAsync(BeforeStartEvent @event, CancellationToken cancellationToken)
Lifecycle\TerminalHostOrphanCleanupService.cs (1)
61eventing.Subscribe<BeforeStartEvent>((@event, _) =>
ResourceBuilderExtensions.cs (1)
4291/// Subscribes to the <see cref="BeforeStartEvent"/> and invokes the specified callback when an HTTPS certificate
TerminalResourceBuilderExtensions.cs (4)
44/// hosts are materialized during <see cref="BeforeStartEvent"/> after the model is fully built, 109appBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) => 135/// <see cref="BeforeStartEvent"/> (e.g. from a test) is a no-op once the 139BeforeStartEvent @event,
Aspire.Hosting.Azure (1)
AzureResourcePreparer.cs (1)
25internal Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken)
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
586builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Tests (4)
AzureCosmosDBExtensionsTests.cs (4)
790var beforeStartEvent = new BeforeStartEvent(app.Services, model); 822var beforeStartEvent = new BeforeStartEvent(app.Services, model); 851var beforeStartEvent = new BeforeStartEvent(app.Services, model); 881var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Hosting.EntityFrameworkCore (2)
EFMigrationResourceBuilderExtensions.cs (2)
39builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, ct) => 332builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, _) =>
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
80var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
864var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 937var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 965var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (24)
ContainerRegistryResourceTests.cs (12)
522var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 543var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 567var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 589var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 612var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 648var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 672var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 702var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 723var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 743var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 764var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 785var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
DistributedApplicationTests.cs (4)
443testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((_, cancellationToken) => 463testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, cancellationToken) => 484testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((_, cancellationToken) => 504testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, cancellationToken) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
236builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
OperationModesTests.cs (1)
114builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
PersistentContainerWarningTests.cs (3)
34var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 58var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 80var beforeStartEvent = new BeforeStartEvent(serviceProvider, model);
WithOtlpExporterTests.cs (2)
225builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 256var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
WithTerminalTests.cs (1)
1278/// Builds the application, publishes <see cref="BeforeStartEvent"/> (the seam that
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
443var beforeStartEvent = new BeforeStartEvent(app.Services, model); 468var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationTestFactory.cs (2)
55public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 75eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
CustomResources.AppHost (2)
TestResource.cs (2)
39public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 87eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
HealthChecksSandbox.AppHost (2)
AppHost.cs (2)
126public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 147eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Stress.AppHost (2)
TestResource.cs (2)
154public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 201eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);