9 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.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);
45 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)
61public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken) 788eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
DistributedApplication.cs (1)
489var beforeStartEvent = new BeforeStartEvent(_host.Services, _host.Services.GetRequiredService<DistributedApplicationModel>());
DistributedApplicationBuilder.cs (5)
238Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 390Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 394Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 403Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 408Eventing.Subscribe<BeforeStartEvent>((e, ct) => BuiltInDistributedApplicationEventSubscriptionHandlers.UpdateContainerRegistryAsync(e, options));
Exec\ExecEventingHandlers.cs (1)
11public static Task InitializeExecResources(BeforeStartEvent beforeStartEvent, CancellationToken _)
ResourceBuilderExtensions.cs (1)
1927builder.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)
30private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 289eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppContainers (2)
AzureContainerAppsInfrastructure.cs (2)
23private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 75eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceInfrastructure.cs (2)
18private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 75eventing.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)
63builder.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)
14/// Implements <see cref="IDistributedApplicationEventingSubscriber"/> and subscribes to <see cref="BeforeStartEvent"/> to configure Docker Compose resources before publish. 20private async Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 100eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
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) 68eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Tests (2)
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
232builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
OperationModesTests.cs (1)
112builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
Aspire.Playground.Tests (2)
Infrastructure\DistributedApplicationTestFactory.cs (2)
54public Task OnBeforeStartAsync(BeforeStartEvent @event, CancellationToken cancellationToken = default) 74eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
AspireWithNode.AppHost (1)
DevCertHostingExtensions.cs (1)
25builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>(async (e, ct) =>
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);