2 implementations of Eventing
Aspire.Hosting.Testing (2)
DistributedApplicationTestingBuilder.cs (2)
526public IDistributedApplicationEventing Eventing => innerBuilder.Eventing; 691public IDistributedApplicationEventing Eventing => _innerBuilder.Eventing;
143 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 (2)
DevTunnelResourceBuilderExtensionsTests.cs (2)
224await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 264await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(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)
928await 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)
977appBuilder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>((evt, _) => 995await appBuilder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()), CancellationToken.None).DefaultTimeout(); 999await appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(dashboard.Resource, app.Services), CancellationToken.None).DefaultTimeout();
Aspire.Hosting.MongoDB.Tests (12)
AddMongoDBTests.cs (10)
140await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 170await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 469await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 494await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 520await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 541await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 579await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 620await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 640await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 658await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
ReplicaSet\AddMongoDBReplicaSetTests.cs (1)
224await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel));
SingleMemberReplicaSetTests.cs (1)
125await 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 (67)
Backchannel\AppHostBackchannelTests.cs (3)
35builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => { 41builder.Eventing.Subscribe<BackchannelConnectedEvent>((e, ct) => { 87builder.Eventing.Subscribe<BackchannelReadyEvent>((e, ct) => {
Backchannel\AuxiliaryBackchannelTests.cs (3)
25builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((e, ct) => 62builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((e, ct) => 118builder.Eventing.Subscribe<AuxiliaryBackchannelConnectedEvent>((_, _) =>
Cli\CliOrphanDetectorTests.cs (1)
268builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) =>
ContainerRegistryResourceTests.cs (12)
522await builder.Eventing.PublishAsync(beforeStartEvent); 543await builder.Eventing.PublishAsync(beforeStartEvent); 567await builder.Eventing.PublishAsync(beforeStartEvent); 589await builder.Eventing.PublishAsync(beforeStartEvent); 612await builder.Eventing.PublishAsync(beforeStartEvent); 648await builder.Eventing.PublishAsync(beforeStartEvent); 672await builder.Eventing.PublishAsync(beforeStartEvent); 702await builder.Eventing.PublishAsync(beforeStartEvent); 723await builder.Eventing.PublishAsync(beforeStartEvent); 743await builder.Eventing.PublishAsync(beforeStartEvent); 764await builder.Eventing.PublishAsync(beforeStartEvent); 785await 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)
24builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 53builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 82builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => { 113builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => {
Orchestrator\ApplicationOrchestratorTests.cs (1)
47var 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)
1070var 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 (14)
344await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 399await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 435await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 513await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 603await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 655await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1051await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1067await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1085await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1415await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1437await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1462await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1484await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model))); 1537await 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);