1 implementation of Subscribe
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
77public DistributedApplicationEventSubscription Subscribe<T>(Func<T, CancellationToken, Task> callback) where T : IDistributedApplicationEvent
38 references to Subscribe
Aspire.Cli.Tests (1)
Hosting\CliOrphanDetectorTests.cs (1)
221builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => {
Aspire.Hosting (13)
DistributedApplicationBuilder.cs (5)
235Eventing.Subscribe<BeforeStartEvent>(ExecEventingHandlers.InitializeExecResources); 385Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.InitializeDcpAnnotations); 389Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.MutateHttp2TransportAsync); 398Eventing.Subscribe<BeforeStartEvent>(BuiltInDistributedApplicationEventSubscriptionHandlers.ExcludeDashboardFromManifestAsync); 403Eventing.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 (4)
58_eventing.Subscribe<ResourceEndpointsAllocatedEvent>(OnResourceEndpointsAllocated); 59_eventing.Subscribe<ConnectionStringAvailableEvent>(PublishConnectionStringValue); 61_eventing.Subscribe<BeforeResourceStartedEvent>(WaitForInBeforeResourceStartedEvent); 62_eventing.Subscribe<InitializeResourceEvent>(OnResourceInitialized);
PublisherDistributedApplicationBuilderExtensions.cs (1)
29builder.Eventing.Subscribe<PublisherAdvertisementEvent>((e, ct) => {
ResourceBuilderExtensions.cs (1)
1789builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
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 (1)
AzureRedisExtensions.cs (1)
206builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
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)
619events.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) => {