27 instantiations of BeforeStartEvent
Aspire.Hosting (1)
DistributedApplication.cs (1)
537var 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)
842var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 859var beforeStartEvent = new BeforeStartEvent(app.Services, appModel);
Aspire.Hosting.Tests (20)
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 (8)
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(); 236await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None).DefaultTimeout(); 315await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 403await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 475await hook.OnBeforeStartAsync(new BeforeStartEvent(new TestServiceProvider(), model), CancellationToken.None); 545await 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);
75 references to BeforeStartEvent
Aspire.Hosting (16)
ApplicationModel\BeforeStartEvent.cs (1)
20/// Subscribe to the <see cref="BeforeStartEvent"/> event and resolve the distributed application model.
Ats\BuilderExports.cs (1)
112return builder.Eventing.Subscribe<BeforeStartEvent>(async (@event, ct) =>
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)
64public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 884eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (1)
537var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
DistributedApplicationBuilder.cs (5)
306Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 498Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 502Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 557Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 562Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
Exec\ExecEventingHandlers.cs (1)
11public static Task InitializeExecResources(BeforeStartEvent beforeStartEvent, CancellationToken _)
Aspire.Hosting.Azure (4)
AzureResourcePreparer.cs (2)
23public async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 439eventing.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)
79builder.Eventing.Subscribe<BeforeStartEvent>((beforeStartEvent, cancellationToken) =>
Aspire.Hosting.Azure.CosmosDB (1)
AzureCosmosDBExtensions.cs (1)
413builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, _) =>
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
151builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresExtensions.cs (1)
305builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Azure.Redis (2)
AzureManagedRedisExtensions.cs (1)
138builder.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) 129eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.JavaScript (4)
JavaScriptHostingExtensions.cs (4)
263builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 466builder.Eventing.Subscribe<BeforeStartEvent>((_, _) => 634builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 988resource.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) 73eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
118appBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) =>
Aspire.Hosting.Python (3)
PythonAppResourceBuilderExtensions.cs (3)
315builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) => 513builder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) => 1349builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
178builder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) => 393builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
Aspire.Hosting.Redis.Tests (2)
AddRedisTests.cs (2)
842var beforeStartEvent = new BeforeStartEvent(app.Services, appModel); 859var 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);
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)
57public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 104eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);