2 implementations of Eventing
Aspire.Hosting.Testing (2)
DistributedApplicationTestingBuilder.cs (2)
526public IDistributedApplicationEventing Eventing => innerBuilder.Eventing; 691public IDistributedApplicationEventing Eventing => _innerBuilder.Eventing;
218 references to Eventing
Aspire.Hosting.Azure.EntraId.Tests (9)
EntraIdProvisioningTests.cs (9)
1172await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1286await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1313await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1338var publish = builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), cts.Token); 1381await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(web.Resource, app.Services), CancellationToken.None); 1399await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1457await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1490await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None); 1511await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(web.Resource, app.Services), CancellationToken.None);
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)
355builder.Eventing
Aspire.Hosting.DevTunnels.Tests (2)
DevTunnelResourceBuilderExtensionsTests.cs (2)
237await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout(); 279await builder.Eventing.PublishAsync(new BeforeResourceStartedEvent(tunnel.Resource, app.Services)).DefaultTimeout();
Aspire.Hosting.Dotnet.Tests (39)
DotnetProjectBuildCoordinatorTests.cs (35)
81await builder.Eventing.PublishAsync( 119await builder.Eventing.PublishAsync( 225await builder.Eventing.PublishAsync( 242await builder.Eventing.PublishAsync( 305await builder.Eventing.PublishAsync( 714await builder.Eventing.PublishAsync( 734await builder.Eventing.PublishAsync( 778await builder.Eventing.PublishAsync( 1724builder.Eventing.PublishAsync( 1773builder.Eventing.PublishAsync( 1813builder.Eventing.PublishAsync( 1838await builder.Eventing.PublishAsync( 1850await builder.Eventing.PublishAsync( 1862builder.Eventing.PublishAsync( 1888await builder.Eventing.PublishAsync( 1908await builder.Eventing.PublishAsync( 1911await builder.Eventing.PublishAsync( 1923await builder.Eventing.PublishAsync( 1928builder.Eventing.PublishAsync( 2008await builder.Eventing.PublishAsync( 2067await builder.Eventing.PublishAsync( 2187await builder.Eventing.PublishAsync( 2285builder.Eventing.PublishAsync( 2409await builder.Eventing.PublishAsync( 2426await builder.Eventing.PublishAsync( 2638await builder.Eventing.PublishAsync( 2686await builder.Eventing.PublishAsync( 2755await builder.Eventing.PublishAsync( 2765var secondStartTask = builder.Eventing.PublishAsync( 2891await builder.Eventing.PublishAsync( 2914await builder.Eventing.PublishAsync( 3173builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 3197builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 3225builder.Eventing.Subscribe<BeforeStartEvent>((@event, _) => 3422builder.Eventing.Subscribe<BeforeStartEvent>((_, _) =>
DotnetProjectPathTests.cs (3)
139builder.Eventing.PublishAsync( 171builder.Eventing.PublishAsync( 295builder.Eventing.PublishAsync(
DotnetProjectResourceTests.cs (1)
510await builder.Eventing.PublishAsync(
Aspire.Hosting.EntityFrameworkCore.Tests (2)
EFBuildReadinessTests.cs (2)
74await builder.Eventing.PublishAsync( 108await builder.Eventing.PublishAsync(
Aspire.Hosting.Foundry.Tests (1)
HostedAgentExtensionTests.cs (1)
929await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
Aspire.Hosting.Go.Tests (3)
GoRunDebuggingTests.cs (3)
113await builder.Eventing.PublishAsync(new BeforeStartEvent( 248await builder.Eventing.PublishAsync(new BeforeStartEvent( 442await builder.Eventing.PublishAsync(new BeforeStartEvent(
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)
423await 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)
1000await builder.Eventing.PublishAsync(beforeStartEvent); 1037await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel)); 1073await 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.Testing.Tests (1)
DashboardTestingBuilderTests.cs (1)
121builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) =>
Aspire.Hosting.Tests (109)
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)
432await builder.Eventing.PublishAsync(beforeStartEvent); 559await builder.Eventing.PublishAsync(beforeStartEvent); 580await builder.Eventing.PublishAsync(beforeStartEvent); 604await builder.Eventing.PublishAsync(beforeStartEvent); 626await builder.Eventing.PublishAsync(beforeStartEvent); 649await builder.Eventing.PublishAsync(beforeStartEvent); 685await builder.Eventing.PublishAsync(beforeStartEvent); 709await builder.Eventing.PublishAsync(beforeStartEvent); 739await builder.Eventing.PublishAsync(beforeStartEvent); 760await builder.Eventing.PublishAsync(beforeStartEvent); 780await builder.Eventing.PublishAsync(beforeStartEvent); 801await builder.Eventing.PublishAsync(beforeStartEvent);
Dcp\DcpExecutorTests.cs (2)
5212builder.Eventing.Subscribe<ResourceEndpointsAllocatedEvent>(async (@event, ct) => 5226distributedApplicationEventing: builder.Eventing);
DistributedApplicationTests.cs (1)
197builder.Eventing.Subscribe<BeforeStartEvent>((e, _) =>
Eventing\DistributedApplicationBuilderEventingTests.cs (24)
27builder.Eventing.Subscribe<DummyEvent>(async (_, ct) => 38await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent, cts.Token).DefaultTimeout(); 59builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 66builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 72var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingSequential); 91builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 98builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 105var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingConcurrent); 123builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 130builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 137await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent).DefaultTimeout(); 156builder.Eventing.Subscribe<DummyEvent>(async (@event, ct) => 165builder.Eventing.Subscribe<DummyEvent>((@event, ct) => 172await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingSequential).DefaultTimeout(); 205Assert.Equal(builder.Eventing, eventing); 243builder.Eventing.Subscribe<BeforeResourceStartedEvent>((e, ct) => 268builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 276builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => 284builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => 313builder.Eventing.Subscribe<AfterEndpointsAllocatedEvent>((e, ct) => Task.CompletedTask); 428builder.Eventing.Subscribe<AfterResourcesCreatedEvent>((e, ct) => 524builder.Eventing.Subscribe<IDistributedApplicationEvent>((_, _) => Task.CompletedTask)); 536builder.Eventing.Subscribe<AbstractDummyEvent>((_, _) => Task.CompletedTask)); 549builder.Eventing.Subscribe<IDistributedApplicationResourceEvent>(resource.Resource, (_, _) => Task.CompletedTask));
Health\ResourceHealthCheckServiceTests.cs (1)
661builder.Eventing.Subscribe<ResourceReadyEvent>(resource.Resource, (_, _) => throw new InvalidOperationException("ResourceReadyEvent failed"));
InteractionServiceTests.cs (2)
217builder.Eventing.Subscribe<BeforeStartEvent>(async (e, ct) => 255builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => throw new InvalidOperationException("Before-start failed."));
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 (33)
46applicationEventing: builder.Eventing); 51builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 81applicationEventing: builder.Eventing); 85builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 117applicationEventing: builder.Eventing); 121builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 128builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 147applicationEventing: builder.Eventing); 151builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 155builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 186await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 212await builder.Eventing.PublishResourceEndpointsAllocatedAsync(new(frontend.Resource, app.Services), default); 252applicationEventing: builder.Eventing); 256[new(frontend.Resource, app.Services)], builder.Eventing, dispatchBehavior, cts.Token); 312applicationEventing: builder.Eventing, dashboardOptions: new() { DashboardUrl = dashboardUrl }); 317await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 357applicationEventing: builder.Eventing); 359await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 360await orchestrator.PublishEndpointsAllocatedAsync([new(manager.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 384applicationEventing: builder.Eventing); 387var publish = orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 421applicationEventing: builder.Eventing); 423await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 442applicationEventing: builder.Eventing); 445await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 469applicationEventing: builder.Eventing); 471await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 490applicationEventing: builder.Eventing); 492await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 518applicationEventing: builder.Eventing); 520await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 524await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 552var orchestrator = CreateOrchestrator(model, notificationService: notifications, dcpEvents: events, applicationEventing: builder.Eventing);
ProjectRebuilderResourceTests.cs (4)
32await builder.Eventing.PublishAsync( 36await builder.Eventing.PublishAsync( 70await builder.Eventing.PublishAsync( 103await builder.Eventing.PublishAsync(
ProjectResourceTests.cs (1)
1124var publishTask = builder.Eventing.PublishAsync(
Terminals\ResourceTerminalCatalogTests.cs (1)
265await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model));
WithBindMountTests.cs (1)
191builder.Eventing.Subscribe<BeforeResourceStartedEvent>(container.Resource, (_, _) =>
WithOtlpExporterTests.cs (2)
294builder.Eventing.Subscribe<BeforeStartEvent>((e, ct) => 326await builder.Eventing.PublishAsync(beforeStartEvent);
WithTerminalTests.cs (14)
356await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 411await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 447await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 525await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 615await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 667await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1063await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1079await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1097await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1427await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1449await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1476await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model)); 1498await Assert.ThrowsAsync<IOException>(async () => await builder.Eventing.PublishAsync(new BeforeStartEvent(app.Services, model))); 1551await 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);