49 references to EventDispatchBehavior
Aspire.Hosting (16)
Backchannel\AuxiliaryBackchannelService.cs (1)
133EventDispatchBehavior.NonBlockingConcurrent,
Backchannel\BackchannelService.cs (2)
70EventDispatchBehavior.NonBlockingConcurrent, 95EventDispatchBehavior.NonBlockingConcurrent,
DistributedApplicationEventingExtensions.cs (2)
31eventing.PublishResourceEndpointsAllocatedAsync(@event, EventDispatchBehavior.BlockingSequential, cancellationToken); 47public static Task PublishResourceEndpointsAllocatedAsync(this IDistributedApplicationEventing eventing, ResourceEndpointsAllocatedEvent @event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken)
Eventing\DistributedApplicationEventing.cs (7)
20return PublishAsync(@event, EventDispatchBehavior.BlockingSequential, cancellationToken); 25public async Task PublishAsync<T>(T @event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent 29if (dispatchBehavior == EventDispatchBehavior.BlockingConcurrent || dispatchBehavior == EventDispatchBehavior.NonBlockingConcurrent) 38if (dispatchBehavior == EventDispatchBehavior.NonBlockingConcurrent) 54if (dispatchBehavior == EventDispatchBehavior.NonBlockingSequential) 80EventDispatchBehavior dispatchBehavior,
Eventing\IDistributedApplicationEventing.cs (1)
56Task PublishAsync<T>(T @event, EventDispatchBehavior dispatchBehavior, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent;
Orchestrator\ApplicationOrchestrator.cs (3)
202PublishEndpointsAllocatedAsync(context.Events, _eventing, EventDispatchBehavior.BlockingSequential, context.CancellationToken); 207EventDispatchBehavior dispatchBehavior, 797await _eventing.PublishAsync(initializeEvent, EventDispatchBehavior.NonBlockingConcurrent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
226await eventing.PublishAsync<BeforeResourceStartedEvent>(new(portResource, e.Services), EventDispatchBehavior.NonBlockingConcurrent, ct).ConfigureAwait(false); 850EventDispatchBehavior.NonBlockingSequential, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Kafka.Tests (1)
AddKafkaTests.cs (1)
296EventDispatchBehavior.BlockingSequential);
Aspire.Hosting.MySql.Tests (1)
AddMySqlTests.cs (1)
425EventDispatchBehavior.BlockingSequential);
Aspire.Hosting.Tests (29)
Dcp\DcpExecutorTests.cs (1)
5000context.Events, eventing, Hosting.Eventing.EventDispatchBehavior.BlockingSequential, context.CancellationToken));
Eventing\DistributedApplicationBuilderEventingTests.cs (5)
38await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent, cts.Token).DefaultTimeout(); 72var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingSequential); 105var pendingPublish = builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.BlockingConcurrent); 137await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingConcurrent).DefaultTimeout(); 172await builder.Eventing.PublishAsync(new DummyEvent(), EventDispatchBehavior.NonBlockingSequential).DefaultTimeout();
Orchestrator\ApplicationOrchestratorTests.cs (21)
51builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 85builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 121builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 128builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 151builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 155builder.Eventing, EventDispatchBehavior.BlockingSequential, cts.Token).DefaultTimeout(); 221[InlineData(EventDispatchBehavior.BlockingSequential)] 222[InlineData(EventDispatchBehavior.BlockingConcurrent)] 223[InlineData(EventDispatchBehavior.NonBlockingSequential)] 224[InlineData(EventDispatchBehavior.NonBlockingConcurrent)] 225public async Task BrowserUrlIsFinalizedBeforeAllocationEventHandlers(EventDispatchBehavior dispatchBehavior) 317await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 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); 387var publish = orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 423await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 445await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default).DefaultTimeout(); 471await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 492await orchestrator.PublishEndpointsAllocatedAsync([new(frontend.Resource, app.Services)], builder.Eventing, EventDispatchBehavior.BlockingSequential, default); 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);
WithUrlsTests.cs (2)
88await e.Eventing.PublishResourceEndpointsAllocatedAsync(new ResourceEndpointsAllocatedEvent(custom, e.Services), EventDispatchBehavior.BlockingConcurrent, ct); 91await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(custom, e.Services), EventDispatchBehavior.BlockingSequential, ct);