12 instantiations of BeforeStartEvent
Aspire.Hosting (1)
DistributedApplication.cs (1)
489var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
Aspire.Hosting.Azure.Tests (1)
AzureManifestUtils.cs (1)
27await azurePreparer.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), appModel), cancellationToken: default);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
2299await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
818var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 835var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (7)
Dashboard\DashboardLifecycleHookTests.cs (7)
46await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 89await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 137await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 237await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 325await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 397await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 467await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None);
57 references to BeforeStartEvent
Aspire.Hosting (15)
ApplicationModel\BeforeStartEvent.cs (1)
20/// Subscribe to the <see cref="BeforeStartEvent"/> event and resolve the distributed application model.
BuiltInDistributedApplicationEventSubscriptionHandlers.cs (4)
12public static Task InitializeDcpAnnotations(BeforeStartEvent beforeStartEvent, CancellationToken _) 41public static Task ExcludeDashboardFromManifestAsync(BeforeStartEvent beforeStartEvent, CancellationToken _) 52public static Task MutateHttp2TransportAsync(BeforeStartEvent beforeStartEvent, CancellationToken _) 67public static Task UpdateContainerRegistryAsync(BeforeStartEvent @event, DistributedApplicationOptions options)
Dashboard\DashboardEventHandlers.cs (2)
62public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 841eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (1)
489var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
DistributedApplicationBuilder.cs (5)
288Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 457Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 461Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 516Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 521Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
Exec\ExecEventingHandlers.cs (1)
11public static Task InitializeExecResources(BeforeStartEvent beforeStartEvent, CancellationToken _)
ResourceBuilderExtensions.cs (1)
2155builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
Aspire.Hosting.Azure (4)
AzureResourcePreparer.cs (2)
23public async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 544eventing.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) 73eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceInfrastructure.cs (2)
18private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 73eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
400builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, _) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
107builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
300builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Redis (2)
AzureRedisEnterpriseExtensions.cs (1)
141builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
AzureRedisExtensions.cs (1)
206builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Docker (3)
DockerComposeInfrastructure.cs (3)
13/// Implements <see cref="IDistributedApplicationEventingSubscriber"/> and subscribes to <see cref="BeforeStartEvent"/> to configure Docker Compose resources before publish. 19private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 99eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.JavaScript (3)
JavaScriptHostingExtensions.cs (3)
199builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 383builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 667resource.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Keycloak (1)
KeycloakResourceBuilderExtensions.cs (1)
109builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
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) 66eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
118appBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) =>
Aspire.Hosting.Python (3)
PythonAppResourceBuilderExtensions.cs (3)
316builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) => 516builder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) => 1366builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
176builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) => 386builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
818var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 835var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (2)
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
232builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
OperationModesTests.cs (1)
112builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
Aspire.Hosting.Yarp (1)
YarpResourceExtensions.cs (1)
55builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
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)
38public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 86eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
HealthChecksSandbox.AppHost (2)
Program.cs (2)
66public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 87eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Stress.AppHost (2)
TestResource.cs (2)
57public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 104eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);