2 implementations of Eventing
Aspire.Hosting.Testing (2)
DistributedApplicationTestingBuilder.cs (2)
530public IDistributedApplicationEventing Eventing => innerBuilder.Eventing; 693public IDistributedApplicationEventing Eventing => _innerBuilder.Eventing;
140 references to Eventing
Aspire.Hosting.Azure.Tests (7)
AzureCosmosDBExtensionsTests.cs (6)
807await builder.Eventing.PublishAsync(beforeStartEvent); 839await builder.Eventing.PublishAsync(beforeStartEvent); 868await builder.Eventing.PublishAsync(beforeStartEvent); 898await builder.Eventing.PublishAsync(beforeStartEvent); 1141() => builder.Eventing.PublishAsync(new ResourceReadyEvent(cosmos.Resource, app.Services))); 1158await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(cosmos.Resource, app.Services));
FoundryExtensionsTests.cs (1)
354builder.Eventing
Aspire.Hosting.DevTunnels.Tests (3)
DevTunnelResourceBuilderExtensionsTests.cs (3)
225await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 265await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 759await builder.Eventing.PublishAsync(new ResourceReadyEvent(tunnel.Resource, app.Services)).DefaultTimeout();
Aspire.Hosting.Dotnet.Tests (19)
DotnetProjectBuildCoordinatorTests.cs (18)
74await builder.Eventing.PublishAsync( 112await builder.Eventing.PublishAsync( 218await builder.Eventing.PublishAsync( 235await builder.Eventing.PublishAsync( 429await builder.Eventing.PublishAsync( 449await builder.Eventing.PublishAsync( 1427await builder.Eventing.PublishAsync( 1444await builder.Eventing.PublishAsync( 1651await builder.Eventing.PublishAsync( 1699await builder.Eventing.PublishAsync( 1768await builder.Eventing.PublishAsync( 1778var secondStartTask = builder.Eventing.PublishAsync( 1904await builder.Eventing.PublishAsync( 1927await builder.Eventing.PublishAsync( 2174builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 2198builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 2226builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 2423builder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
DotnetProjectResourceTests.cs (1)
534await builder.Eventing.PublishAsync(
Aspire.Hosting.EntityFrameworkCore.Tests (2)
EFBuildReadinessTests.cs (2)
71await builder.Eventing.PublishAsync( 103await builder.Eventing.PublishAsync(
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
875await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Java.Tests (16)
AddJavaAppTests.cs (4)
746() => builder.Eventing.PublishAsync( 765() => builder.Eventing.PublishAsync( 792await builder.Eventing.PublishAsync( 853() => builder.Eventing.PublishAsync(
AddQuarkusAppTests.cs (3)
96await builder.Eventing.PublishAsync( 113await builder.Eventing.PublishAsync( 285() => builder.Eventing.PublishAsync(
AddSpringBootAppTests.cs (9)
21await builder.Eventing.PublishAsync( 38await builder.Eventing.PublishAsync( 55await builder.Eventing.PublishAsync( 75await runBuilder.Eventing.PublishAsync( 113await builder.Eventing.PublishAsync( 136await builder.Eventing.PublishAsync( 189() => builder.Eventing.PublishAsync( 210() => runBuilder.Eventing.PublishAsync( 237await builder.Eventing.PublishAsync(
Aspire.Hosting.Kafka.Tests (4)
AddKafkaTests.cs (4)
31await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka.Resource, app.Services)); 47await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka1.Resource, app.Services)); 48await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(kafka2.Resource, app.Services)); 294await appBuilder.Eventing.PublishAsync(
Aspire.Hosting.Keycloak.Tests (1)
KeycloakResourceBuilderTests.cs (1)
81await builder.Eventing.PublishAsync(beforeStartEvent);
Aspire.Hosting.Maui.Tests (3)
MauiPlatformExtensionsTests.cs (3)
978appBuilder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>((evt, _) => 996await appBuilder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), CancellationToken.None).DefaultTimeout(); 1000await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout();
Aspire.Hosting.MongoDB.Tests (9)
AddMongoDBTests.cs (7)
411await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 436await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 462await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 483await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 505await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 525await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 543await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
224await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
SingleMemberReplicaSetTests.cs (1)
126await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.MySql.Tests (1)
AddMySqlTests.cs (1)
400await appBuilder.Eventing.PublishAsync(
Aspire.Hosting.Qdrant.Tests (1)
QdrantFunctionalTests.cs (1)
237builder.Eventing.Subscribe<ConnectionStringAvailableEvent>(qdrantResource, (e, ct) =>
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
938await builder.Eventing.PublishAsync(beforeStartEvent); 975await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 1011await builder.Eventing.PublishAsync(beforeStartEvent);
Aspire.Hosting.SqlServer.Tests (2)
AddSqlServerTests.cs (2)
321await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(sqlServer.Resource, app.Services)); 322await builder.Eventing.PublishAsync(new ConnectionStringAvailableEvent(db.Resource, app.Services));
Aspire.Hosting.Tests (66)
Backchannel\AppHostBackchannelTests.cs (3)
37builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => { 43builder.Eventing.Subscribe<BackchannelConnectedEvent>((e, ct) => { 89builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => {
Backchannel\AuxiliaryBackchannelTests.cs (3)
27builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((e, ct) => 64builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((e, ct) => 114builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((_, _) =>
Cli\CliOrphanDetectorTests.cs (1)
268builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
ContainerRegistryResourceTests.cs (12)
523await builder.Eventing.PublishAsync(beforeStartEvent); 544await builder.Eventing.PublishAsync(beforeStartEvent); 568await builder.Eventing.PublishAsync(beforeStartEvent); 590await builder.Eventing.PublishAsync(beforeStartEvent); 613await builder.Eventing.PublishAsync(beforeStartEvent); 649await builder.Eventing.PublishAsync(beforeStartEvent); 673await builder.Eventing.PublishAsync(beforeStartEvent); 703await builder.Eventing.PublishAsync(beforeStartEvent); 724await builder.Eventing.PublishAsync(beforeStartEvent); 744await builder.Eventing.PublishAsync(beforeStartEvent); 765await builder.Eventing.PublishAsync(beforeStartEvent); 786await builder.Eventing.PublishAsync(beforeStartEvent);
Eventing\DistributedApplicationBuilderEventingTests.cs (22)
27builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 34builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 40var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingSequential); 59builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 66builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 73var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingConcurrent); 91builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 98builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 105await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent).DefaultTimeout(); 124builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 133builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 140await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingSequential).DefaultTimeout(); 173Assert.Equal(builder.Eventing, eventing); 211builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) => 236builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 244builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => 252builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => 281builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => Task.CompletedTask); 396builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => 492builder.Eventing.Subscribe<IDistributedApplicationEvent>((_, _) => Task.CompletedTask)); 504builder.Eventing.Subscribe<AbstractDummyEvent>((_, _) => Task.CompletedTask)); 517builder.Eventing.Subscribe<IDistributedApplicationResourceEvent>(resource.Resource, (_, _) => Task.CompletedTask));
OperationModesTests.cs (4)
25builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 54builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 83builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 114builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
Orchestrator\ApplicationOrchestratorTests.cs (1)
50var orchestrator = CreateOrchestrator(model, notificationService: notifications, dcpEvents: events, applicationEventing: builder.Eventing);
ProjectRebuilderResourceTests.cs (3)
30await builder.Eventing.PublishAsync( 34await builder.Eventing.PublishAsync( 66await builder.Eventing.PublishAsync(
ProjectResourceTests.cs (1)
1046var publishTask = builder.Eventing.PublishAsync(
Terminals\ResourceTerminalCatalogTests.cs (1)
265await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
WithOtlpExporterTests.cs (2)
292builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 324await builder.Eventing.PublishAsync(beforeStartEvent);
WithTerminalTests.cs (13)
323await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 373await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 451await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 593await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 989await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1005await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1023await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1353await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1375await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1400await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1422await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model))); 1464await cleanupService.SubscribeAsync(builder.Eventing, executionContext, CancellationToken.None);
Aspire.Hosting.Yarp.Tests (2)
AddYarpTests.cs (2)
444await builder.Eventing.PublishAsync(beforeStartEvent); 469await builder.Eventing.PublishAsync(beforeStartEvent);