1 implementation of PublishAsync
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
17public Task PublishAsync<T>(T @event, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent
25 references to PublishAsync
Aspire.Hosting (10)
DistributedApplication.cs (1)
455await eventing.PublishAsync(beforeStartEvent, cancellationToken).ConfigureAwait(false);
DistributedApplicationRunner.cs (2)
41await eventing.PublishAsync<BeforePublishEvent>( 48await eventing.PublishAsync<AfterPublishEvent>(
Eventing\DistributedApplicationEventing.cs (2)
15/// <inheritdoc cref="IDistributedApplicationEventing.PublishAsync{T}(T, CancellationToken)" /> 22/// <inheritdoc cref="IDistributedApplicationEventing.PublishAsync{T}(T, CancellationToken)" />
Health\ResourceHealthCheckService.cs (1)
252var task = eventing.PublishAsync(resourceReadyEvent, cancellationToken);
Orchestrator\ApplicationOrchestrator.cs (4)
98await _eventing.PublishAsync(afterEndpointsAllocatedEvent, context.CancellationToken).ConfigureAwait(false); 167await _eventing.PublishAsync(beforeResourceStartedEvent, context.CancellationToken).ConfigureAwait(false); 319await _eventing.PublishAsync(afterResourcesCreatedEvent, cancellationToken).ConfigureAwait(false); 430await _eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (3)
Provisioning\Provisioners\AzureProvisioner.cs (3)
258await eventing.PublishAsync(beforeResourceStartedEvent, cancellationToken).ConfigureAwait(false); 349await eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false); 356await eventing.PublishAsync(childConnectionStringAvailableEvent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
242await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 274builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.PostgreSQL.Tests (3)
AddPostgresTests.cs (3)
381await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 471await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 534await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
Aspire.Hosting.Redis.Tests (4)
AddRedisTests.cs (4)
303await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 493await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 517await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>())); 538await builder.Eventing.PublishAsync<AfterEndpointsAllocatedEvent>(new(app.Services, app.Services.GetRequiredService<DistributedApplicationModel>()));
CustomResources.AppHost (3)
TalkingClockResource.cs (3)
45await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, services), token); 46await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TickHand, services), token); 47await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TockHand, services), token);