1 implementation of PublishAsync
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
17public Task PublishAsync<T>(T @event, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent
22 references to PublishAsync
Aspire.Hosting (11)
DistributedApplication.cs (1)
468await eventing.PublishAsync(beforeStartEvent, cancellationToken).ConfigureAwait(false);
DistributedApplicationRunner.cs (2)
35await eventing.PublishAsync<BeforePublishEvent>( 42await eventing.PublishAsync<AfterPublishEvent>(
Eventing\DistributedApplicationEventing.cs (2)
15/// <inheritdoc cref="IDistributedApplicationEventing.PublishAsync{T}(T, CancellationToken)" /> 22/// <inheritdoc cref="IDistributedApplicationEventing.PublishAsync{T}(T, CancellationToken)" />
ExternalServiceBuilderExtensions.cs (1)
124await e.Eventing.PublishAsync(new BeforeResourceStartedEvent(e.Resource, e.Services), ct).ConfigureAwait(false);
Health\ResourceHealthCheckService.cs (1)
252var task = eventing.PublishAsync(resourceReadyEvent, cancellationToken);
Orchestrator\ApplicationOrchestrator.cs (4)
115await _eventing.PublishAsync(afterEndpointsAllocatedEvent, context.CancellationToken).ConfigureAwait(false); 184await _eventing.PublishAsync(beforeResourceStartedEvent, context.CancellationToken).ConfigureAwait(false); 401await _eventing.PublishAsync(afterResourcesCreatedEvent, cancellationToken).ConfigureAwait(false); 514await _eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
202await eventing.PublishAsync(beforeResourceStartedEvent, cancellationToken).ConfigureAwait(false); 276await eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (1)
AzureAIFoundryExtensions.cs (1)
217await eventing.PublishAsync(connectionStringAvailableEvent, ct).ConfigureAwait(false);
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
244await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 275builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
493await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 517await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 538await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services));
CustomResources.AppHost (3)
TalkingClockResource.cs (3)
65await eventing.PublishAsync(new BeforeResourceStartedEvent(resource, services), token); 66await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TickHand, services), token); 67await eventing.PublishAsync(new BeforeResourceStartedEvent(resource.TockHand, services), token);