26 instantiations of BeforeStartEvent
Aspire.Hosting (1)
DistributedApplication.cs (1)
497var 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)
2391await 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 (19)
ContainerRegistryResourceTests.cs (12)
521var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 542var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 566var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 588var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 611var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 647var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 671var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 701var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 722var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 742var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 763var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 784var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
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(); 243await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 331await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 403await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 473await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None);
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
420var beforeStartEvent = new BeforeStartEvent(app.Services, model); 445var beforeStartEvent = new BeforeStartEvent(app.Services, model);
74 references to BeforeStartEvent
Aspire.Hosting (16)
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)
ContainerRegistryResourceBuilderExtensions.cs (1)
121builder.Eventing.Subscribe<BeforeStartEvent>((beforeStartEvent, cancellationToken) =>
Dashboard\DashboardEventHandlers.cs (2)
65public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 847eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (1)
497var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
DistributedApplicationBuilder.cs (5)
301Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 482Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 486Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 541Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 546Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
Exec\ExecEventingHandlers.cs (1)
11public static Task InitializeExecResources(BeforeStartEvent beforeStartEvent, CancellationToken _)
ResourceBuilderExtensions.cs (1)
2213builder.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) 80eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceInfrastructure.cs (2)
18private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 83eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryExtensions.cs (1)
79builder.Eventing.Subscribe<BeforeStartEvent>((beforeStartEvent, cancellationToken) =>
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
411builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, _) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
156builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
301builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Redis (2)
AzureManagedRedisExtensions.cs (1)
136builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
AzureRedisExtensions.cs (1)
209builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
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) 122eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.JavaScript (4)
JavaScriptHostingExtensions.cs (4)
262builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 463builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 630builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 897resource.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) => 1369builder.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 (14)
ContainerRegistryResourceTests.cs (12)
521var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 542var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 566var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 588var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 611var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 647var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 671var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 701var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 722var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 742var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 763var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 784var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
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)
58builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
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)
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);