1 implementation of Subscribe
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
77public DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent
51 references to Subscribe
Aspire.Cli.Tests (1)
Hosting\CliOrphanDetectorTests.cs (1)
227builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
Aspire.Hosting (14)
Dashboard\DashboardEventHandlers.cs (1)
788eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Devcontainers\DevcontainerPortForwardingLifecycleHook.cs (1)
61eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocatedAsync);
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));
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)
63_eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocated); 64_eventing.Subscribe<ConnectionStringAvailableEvent>(PublishConnectionStringValue); 66_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent);
PublisherDistributedApplicationBuilderExtensions.cs (1)
29builder.Eventing.Subscribe<PublisherAdvertisementEvent>((e, ct) => {
ResourceBuilderExtensions.cs (1)
1927builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
Aspire.Hosting.Azure (2)
AzureResourcePreparer.cs (1)
544eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Provisioning\Provisioners\AzureProvisioner.cs (1)
289eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
75eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
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 (1)
DockerComposeInfrastructure.cs (1)
100eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Kubernetes (1)
KubernetesInfrastructure.cs (1)
68eventing.Subscribe<BeforeStartEvent>(OnBeforeStartAsync);
Aspire.Hosting.Tests (20)
Backchannel\AppHostBackchannelTests.cs (3)
24builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => { 30builder.Eventing.Subscribe<BackchannelConnectedEvent>((e, ct) => { 68builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => {
DistributedApplicationTests.cs (1)
642events.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)
194eventing.Subscribe<AfterResourcesCreatedEvent>(OnAfterResourcesCreated);