36 instantiations of BeforeStartEvent
Aspire.Hosting (1)
DistributedApplication.cs (1)
539var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
Aspire.Hosting.Azure.Tests (5)
AzureCosmosDBExtensionsTests.cs (4)
734var beforeStartEvent = new BeforeStartEvent(app.Services, model); 766var beforeStartEvent = new BeforeStartEvent(app.Services, model); 795var beforeStartEvent = new BeforeStartEvent(app.Services, model); 825var beforeStartEvent = new BeforeStartEvent(app.Services, model);
AzureManifestUtils.cs (1)
29await azurePreparer.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), appModel), cancellationToken: default);
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
141await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
2402await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
812var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 864var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 892var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (23)
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\DashboardLifecycleHookTests.cs (8)
49await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 92await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 140await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 239await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 318await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 401await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 470await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 537await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None);
PersistentContainerWarningTests.cs (3)
33var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 57var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 79var beforeStartEvent = new BeforeStartEvent(serviceProvider, model);
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
420var beforeStartEvent = new BeforeStartEvent(app.Services, model); 445var beforeStartEvent = new BeforeStartEvent(app.Services, model);
83 references to BeforeStartEvent
Aspire.Hosting (21)
ApplicationModel\BeforeStartEvent.cs (1)
20/// Subscribe to the <see cref="BeforeStartEvent"/> event and resolve the distributed application model.
Ats\BuilderExports.cs (2)
201Func<BeforeStartEvent, Task> callback) 206return builder.Eventing.Subscribe<BeforeStartEvent>(async (@event, ct) =>
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 _)
ContainerRegistryResourceBuilderExtensions.cs (1)
123builder.Eventing.Subscribe<BeforeStartEvent>((beforeStartEvent, cancellationToken) =>
Dashboard\DashboardEventHandlers.cs (2)
64public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 912eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (1)
539var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
DistributedApplicationBuilder.cs (6)
313Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 509Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 510Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.WarnPersistentContainersWithoutUserSecrets); 514Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 569Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 574Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
Exec\ExecEventingHandlers.cs (1)
11public static Task InitializeExecResources(BeforeStartEvent beforeStartEvent, CancellationToken _)
ResourceBuilderExtensions.cs (2)
2837/// Subscribes to the <see cref="BeforeStartEvent"/> and invokes the specified callback when an HTTPS certificate 2873builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
Aspire.Hosting.Azure (4)
AzureResourcePreparer.cs (2)
25public async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 448eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Provisioning\Provisioners\AzureProvisioner.cs (2)
31private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 284eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
21private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 90eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceInfrastructure.cs (2)
18private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 90eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryExtensions.cs (1)
84builder.Eventing.Subscribe<BeforeStartEvent>((beforeStartEvent, cancellationToken) =>
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
487builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, _) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
157builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
309builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Redis (2)
AzureManagedRedisExtensions.cs (1)
141builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
AzureRedisExtensions.cs (1)
209builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
504builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Tests (4)
AzureCosmosDBExtensionsTests.cs (4)
734var beforeStartEvent = new BeforeStartEvent(app.Services, model); 766var beforeStartEvent = new BeforeStartEvent(app.Services, model); 795var beforeStartEvent = new BeforeStartEvent(app.Services, model); 825var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Hosting.Docker (3)
DockerComposeInfrastructure.cs (3)
15/// Implements <see cref="IDistributedApplicationEventingSubscriber"/> and subscribes to <see cref="BeforeStartEvent"/> to configure Docker Compose resources before publish. 21private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 129eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.JavaScript (3)
JavaScriptHostingExtensions.cs (3)
269builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 474builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 1142resource.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Kubernetes (3)
KubernetesInfrastructure.cs (3)
13/// Implements <see cref="IDistributedApplicationEventingSubscriber"/> and subscribes to <see cref="BeforeStartEvent"/> to configure Kubernetes resources before publish. 19private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 73eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
119appBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) =>
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (2)
494builder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) => 1335builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
812var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 864var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 892var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (17)
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);
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
233builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
OperationModesTests.cs (1)
113builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
PersistentContainerWarningTests.cs (3)
33var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 57var beforeStartEvent = new BeforeStartEvent(serviceProvider, model); 79var beforeStartEvent = new BeforeStartEvent(serviceProvider, model);
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
420var beforeStartEvent = new BeforeStartEvent(app.Services, model); 445var beforeStartEvent = new BeforeStartEvent(app.Services, model);
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationTestFactory.cs (2)
54public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 74eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
CustomResources.AppHost (2)
TestResource.cs (2)
39public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 87eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DotnetTool.AppHost (1)
AppHost.cs (1)
88builder.Eventing.Subscribe<BeforeStartEvent>(async (evt, _) =>
HealthChecksSandbox.AppHost (2)
Program.cs (2)
66public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 87eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Stress.AppHost (2)
TestResource.cs (2)
59public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 106eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);