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)
530public IDistributedApplicationEventing Eventing => innerBuilder.Eventing; 693public IDistributedApplicationEventing Eventing => _innerBuilder.Eventing;
85 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)
109appBuilder.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)
410gateway.ApplicationBuilder.Eventing.Subscribe<InitializeResourceEvent>(gateway.Resource, (e, ct) =>
Aspire.Hosting.Blazor.Tests (1)
BlazorHostedExtensionsTests.cs (1)
543await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Dotnet (6)
DotnetProjectBuildCoordinator.cs (6)
135var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 142builder.Eventing.Unsubscribe(subscription); 161var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 168builder.Eventing.Unsubscribe(subscription); 680var subscription = builder.Eventing.Subscribe<BeforeResourceStartedEvent>( 686return () => builder.Eventing.Unsubscribe(subscription);
Aspire.Hosting.Dotnet.Tests (1)
DotnetProjectBuildCoordinatorTests.cs (1)
3069await builder.Eventing.PublishAsync(
Aspire.Hosting.EntityFrameworkCore (2)
EFMigrationResourceBuilderExtensions.cs (2)
39builder.ApplicationBuilder.Eventing.Subscribe<BeforeStartEvent>((@event, ct) => 332builder.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)
43builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(kafka, async (@event, ct) => 117builder.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)
776await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout(); 832await appBuilder.Eventing.PublishAsync( 844await appBuilder.Eventing.PublishAsync( 892await appBuilder.Eventing.PublishAsync( 942await appBuilder.Eventing.PublishAsync( 1120appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1146appBuilder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnelConfig.DevTunnel.Resource, app.Services), CancellationToken.None).DefaultTimeout()); 1175appBuilder.Eventing.PublishAsync( 1226appBuilder.Eventing.PublishAsync( 1250await appBuilder.Eventing.PublishAsync( 1342var beforeStartTask = appBuilder.Eventing.PublishAsync(
Aspire.Hosting.MongoDB (1)
MongoDBBuilderExtensions.cs (1)
193builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(mongoDBDatabase, async (@event, ct) =>
Aspire.Hosting.MySql (4)
MySqlBuilderExtensions.cs (4)
47builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(resource, async (@event, ct) => 57builder.Eventing.Subscribe<ResourceReadyEvent>(resource, async (@event, ct) => 130builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(mySqlDatabase, async (@event, ct) => 263builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(phpMyAdminContainer, async (e, ct) =>
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 275builder.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)
63builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(postgresServer, async (@event, ct) => 73builder.Eventing.Subscribe<ResourceReadyEvent>(postgresServer, async (@event, ct) => 162builder.ApplicationBuilder.Eventing.Subscribe<ConnectionStringAvailableEvent>(postgresDatabase, async (@event, ct) =>
Aspire.Hosting.Qdrant (1)
QdrantBuilderExtensions.cs (1)
54builder.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)
82builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(redis, async (@event, ct) => 250builder.ApplicationBuilder.Eventing.Subscribe<BeforeResourceStartedEvent>(resource, async (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
561await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 587await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 608await 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)
6017await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 6057await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 9967await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 10038await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, distributedAppModel)); 10084await 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)
135var applicationEventing = builder.Eventing; 594var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 630var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 676var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 736var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 789var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing, dcpExecutor: dcpExecutor); 842var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing, dcpExecutor: dcpExecutor); 904var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 945var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 1008var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing); 1043var appOrchestrator = CreateOrchestrator(distributedAppModel, notificationService: resourceNotificationService, dcpEvents: events, applicationEventing: builder.Eventing);
Aspire.Hosting.Valkey (1)
ValkeyBuilderExtensions.cs (1)
130builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(valkey, async (@event, ct) =>