1 implementation of Subscribe
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
77public DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent
60 references to Subscribe
Aspire.Cli.Tests (1)
Hosting\CliOrphanDetectorTests.cs (1)
227builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
Aspire.Hosting (14)
Dashboard\DashboardEventHandlers.cs (1)
841eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (1)
61eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocatedAsync);
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));
Eventing\DistributedApplicationEventing.cs (2)
76/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" /> 105/// <inheritdoc cref="IDistributedApplicationEventing.Subscribe{T}(Func{T, CancellationToken, Task})" />
Orchestrator\ApplicationOrchestrator.cs (3)
69_eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocated); 70_eventing.Subscribe<ConnectionStringAvailableEvent>(PublishConnectionStringValue); 72_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent);
PublisherDistributedApplicationBuilderExtensions.cs (1)
30builder.Eventing.Subscribe<PublisherAdvertisementEvent>((e, ct) => {
ResourceBuilderExtensions.cs (1)
2154builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
Aspire.Hosting.Azure (2)
AzureResourcePreparer.cs (1)
544eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Provisioning\Provisioners\AzureProvisioner.cs (1)
284eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
73eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
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 (1)
DockerComposeInfrastructure.cs (1)
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.Kubernetes (1)
KubernetesInfrastructure.cs (1)
66eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Maui (4)
Lifecycle\UnsupportedPlatformEventSubscriber.cs (1)
25eventing.Subscribe<AfterResourcesCreatedEvent>(async (@event, ct) =>
MauiOtlpExtensions.cs (1)
118appBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) =>
Utilities\MauiAndroidEnvironmentAnnotation.cs (1)
45eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync);
Utilities\MauiiOSEnvironmentAnnotation.cs (1)
45eventing.Subscribe<BeforeResourceStartedEvent>(OnBeforeResourceStartedAsync);
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (2)
468builder.Eventing.Subscribe<BeforeStartEvent>((evt, ct) => 1294builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
Aspire.Hosting.Tests (20)
Backchannel\AppHostBackchannelTests.cs (3)
23builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => { 29builder.Eventing.Subscribe<BackchannelConnectedEvent>((e, ct) => { 67builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => {
DistributedApplicationTests.cs (1)
881events.Subscribe<BeforeResourceStartedEvent>(async (e, ct) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (12)
23builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 30builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 55builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 62builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 87builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 94builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 120builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 129builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 207builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) => 232builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 240builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => 248builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
OperationModesTests.cs (4)
23builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 52builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 81builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 112builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
AspireWithNode.AppHost (1)
DevCertHostingExtensions.cs (1)
25builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>(async (e, ct) =>
CustomResources.AppHost (1)
TestResource.cs (1)
86eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
HealthChecksSandbox.AppHost (1)
Program.cs (1)
87eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Stress.AppHost (1)
TestResource.cs (1)
104eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
TestProject.AppHost (1)
TestProgram.cs (1)
205eventing.Subscribe<AfterResourcesCreatedEvent>(OnAfterResourcesCreated);