4 implementations of Eventing
Aspire.Hosting (1)
DistributedApplicationBuilder.cs (1)
107public IDistributedApplicationEventing Eventing { get; } = new DistributedApplicationEventing();
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
773public IDistributedApplicationEventing Eventing => throw new NotImplementedException();
Aspire.Hosting.Testing (2)
DistributedApplicationTestingBuilder.cs (2)
526public IDistributedApplicationEventing Eventing => innerBuilder.Eventing; 691public IDistributedApplicationEventing Eventing => _innerBuilder.Eventing;
86 references to Eventing
Aspire.Hosting (9)
Ats\BuilderExports.cs (4)
209return builder.Eventing.Subscribe<BeforeStartEvent>(async (@event, ct) => 233return builder.Eventing.Subscribe<BeforePublishEvent>(async (@event, ct) => 257return builder.Eventing.Subscribe<AfterPublishEvent>(async (@event, ct) => 281return builder.Eventing.Subscribe<AfterResourcesCreatedEvent>(async (@event, ct) =>
DistributedApplicationEventingExtensions.cs (2)
133builder.Eventing.Subscribe(callback); 141builder.ApplicationBuilder.Eventing.Subscribe<TEvent>(builder.Resource, (evt, ct) => callback(builder.Resource, evt, ct));
ExternalServiceBuilderExtensions.cs (1)
124builder.Eventing.Subscribe<InitializeResourceEvent>(resource, static async (e, ct) =>
PublisherDistributedApplicationBuilderExtensions.cs (1)
30builder.Eventing.Subscribe<PublisherAdvertisementEvent>((e, ct) => {
TerminalResourceBuilderExtensions.cs (1)
110appBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, cancellationToken) =>
Aspire.Hosting.Azure.Sql (1)
AzureSqlServerResource.cs (1)
586builder.Eventing.Subscribe<BeforeStartEvent>((data, token) =>
Aspire.Hosting.Blazor (1)
BlazorGatewayExtensions.cs (1)
498gateway.ApplicationBuilder.Eventing.Subscribe<InitializeResourceEvent>(gateway.Resource, (e, ct) =>
Aspire.Hosting.Blazor.Tests (1)
BlazorHostedExtensionsTests.cs (1)
616await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Dotnet (6)
DotnetProjectBuildCoordinator.cs (6)
140var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 147builder.Eventing.Unsubscribe(subscription); 166var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 173builder.Eventing.Unsubscribe(subscription); 772var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 778return () => builder.Eventing.Unsubscribe(subscription);
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildCoordinatorTests.cs (1)
4050await builder.Eventing.PublishAsync(
Aspire.Hosting.EntityFrameworkCore (2)
EFMigrationResourceBuilderExtensions.cs (2)
40builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, ct) => 351builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, _) =>
Aspire.Hosting.Foundry (1)
FoundryExtensions.cs (1)
395builder.ApplicationBuilder.Eventing.Subscribe<ResourceReadyEvent>(foundryResource, (@event, ct) =>
Aspire.Hosting.Garnet (1)
GarnetBuilderExtensions.cs (1)
116builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(garnet, async (@event, ct) =>
Aspire.Hosting.JavaScript.Tests (1)
RequiredCommandTests.cs (1)
233await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
44builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(kafka, async (@event, ct) => 135builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(kafkaUi, (e, ct) =>
Aspire.Hosting.Maui (5)
MauiOtlpExtensions.cs (5)
127appBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(async (evt, ct) => 188await AllocateOtlpStubEndpointAsync(currentTunnelConfig, dashboardOtlpEndpoint.Value, evt.Services, appBuilder.Eventing, ct).ConfigureAwait(false); 192appBuilder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>(async (evt, ct) => 202await AllocateOtlpStubEndpointAsync(currentTunnelConfig, dashboardOtlpEndpoint, evt.Services, appBuilder.Eventing, ct).ConfigureAwait(false); 209appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(stubResource, evt.Services), ct));
Aspire.Hosting.Maui.Tests (11)
MauiPlatformExtensionsTests.cs (11)
775await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout(); 831await appBuilder.Eventing.PublishAsync( 843await appBuilder.Eventing.PublishAsync( 891await appBuilder.Eventing.PublishAsync( 941await appBuilder.Eventing.PublishAsync( 1119appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1145appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1174appBuilder.Eventing.PublishAsync( 1225appBuilder.Eventing.PublishAsync( 1249await appBuilder.Eventing.PublishAsync( 1341var beforeStartTask = appBuilder.Eventing.PublishAsync(
Aspire.Hosting.MongoDB (2)
MongoDBBuilderExtensions.cs (2)
274builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(mongoDBDatabase, async (@event, ct) => 345builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, ct) =>
Aspire.Hosting.MySql (4)
MySqlBuilderExtensions.cs (4)
49builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(resource, async (@event, ct) => 59builder.Eventing.Subscribe<ResourceReadyEvent>(resource, async (@event, ct) => 179builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(mySqlDatabase, async (@event, ct) => 329builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(phpMyAdminContainer, async (e, ct) =>
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
260await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 291builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Nats (1)
NatsBuilderExtensions.cs (1)
64builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(nats, async (@event, ct) =>
Aspire.Hosting.Oracle (1)
OracleDatabaseBuilderExtensions.cs (1)
45builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(oracleDatabaseServer, async (@event, ct) =>
Aspire.Hosting.PostgreSQL (3)
PostgresBuilderExtensions.cs (3)
66builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(postgresServer, async (@event, ct) => 76builder.Eventing.Subscribe<ResourceReadyEvent>(postgresServer, async (@event, ct) => 208builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(postgresDatabase, async (@event, ct) =>
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
56builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(qdrant, async (@event, ct) =>
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
47builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(rabbitMq, async (@event, ct) =>
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
83builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(redis, async (@event, ct) => 302builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
563await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 589await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 610await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
Aspire.Hosting.Testing (2)
DistributedApplicationTestingBuilder.cs (2)
780/// <inheritdoc cref="IDistributedApplicationBuilder.Eventing" /> 781new IDistributedApplicationEventing Eventing => ((IDistributedApplicationBuilder)this).Eventing;
Aspire.Hosting.Tests (21)
Dcp\DcpExecutorTests.cs (5)
6629await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 6669await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11154await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11225await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 11271await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel));
DistributedApplicationTests.cs (5)
334testProgram.AppBuilder.Eventing.Subscribe<AfterResourcesCreatedEvent>((_, _) => 447testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((_, cancellationToken) => 467testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, cancellationToken) => 488testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((_, cancellationToken) => 508testProgram.AppBuilder.Eventing.Subscribe<BeforeStartEvent>((evt, cancellationToken) =>
Orchestrator\ApplicationOrchestratorTests.cs (11)
180var applicationEventing = builder.Eventing; 639var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 675var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 721var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 781var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 834var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing, dcpExecutor: dcpExecutor); 887var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing, dcpExecutor: dcpExecutor); 949var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 990var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 1053var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 1088var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
132builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(valkey, async (@event, ct) =>