1 implementation of PublishAsync
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
17public Task PublishAsync<T>(T @event, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent
23 references to PublishAsync
Aspire.Hosting (11)
DistributedApplication.cs (1)
468await eventing.PublishAsync(beforeStartEvent, cancellationToken).ConfigureAwait(false);
DistributedApplicationRunner.cs (2)
36await eventing.PublishAsync<BeforePublishEvent>( 43await 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)
144await 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)
118await _eventing.PublishAsync(afterEndpointsAllocatedEvent, context.CancellationToken).ConfigureAwait(false); 187await _eventing.PublishAsync(beforeResourceStartedEvent, context.CancellationToken).ConfigureAwait(false); 404await _eventing.PublishAsync(afterResourcesCreatedEvent, cancellationToken).ConfigureAwait(false); 520await _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)
250await eventing.PublishAsync(connectionStringAvailableEvent, ct).ConfigureAwait(false);
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
71await evt.Eventing.PublishAsync(new ConnectionStringAvailableEvent(r, evt.Services), ct)
Aspire.Hosting.MySql.Tests (2)
AddMySqlTests.cs (2)
243await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services)); 274builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(myAdmin, app.Services));
Aspire.Hosting.Redis.Tests (3)
AddRedisTests.cs (3)
496await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 522await builder.Eventing.PublishAsync<BeforeResourceStartedEvent>(new(commander, app.Services)); 543await 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);