1 implementation of PublishAsync
Aspire.Hosting (1)
Eventing\DistributedApplicationEventing.cs (1)
17public Task PublishAsync<T>(T @event, CancellationToken cancellationToken = default) where T : IDistributedApplicationEvent
34 references to PublishAsync
Aspire.Hosting (14)
ConnectionStringBuilderExtensions.cs (2)
92await @evt.Eventing.PublishAsync(new BeforeResourceStartedEvent(r, @evt.Services), ct).ConfigureAwait(false); 102await evt.Eventing.PublishAsync(new ConnectionStringAvailableEvent(r, evt.Services), ct)
DistributedApplication.cs (1)
490await eventing.PublishAsync(beforeStartEvent, cancellationToken).ConfigureAwait(false);
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)
255var task = eventing.PublishAsync(resourceReadyEvent, cancellationToken);
Orchestrator\ApplicationOrchestrator.cs (5)
128await _eventing.PublishAsync(afterEndpointsAllocatedEvent, context.CancellationToken).ConfigureAwait(false); 197await _eventing.PublishAsync(beforeResourceStartedEvent, context.CancellationToken).ConfigureAwait(false); 455await _eventing.PublishAsync(afterResourcesCreatedEvent, cancellationToken).ConfigureAwait(false); 577await _eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false); 601await _eventing.PublishAsync(createEvent(resource), cancellationToken).ConfigureAwait(false);
Publishing\PipelineExecutor.cs (2)
51await eventing.PublishAsync<BeforePublishEvent>( 57await eventing.PublishAsync<AfterPublishEvent>(
Aspire.Hosting.Azure (2)
Provisioning\Provisioners\AzureProvisioner.cs (2)
190await eventing.PublishAsync(beforeResourceStartedEvent, cancellationToken).ConfigureAwait(false); 264await eventing.PublishAsync(connectionStringAvailableEvent, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (1)
AzureAIFoundryExtensions.cs (1)
283await eventing.PublishAsync(connectionStringAvailableEvent, ct).ConfigureAwait(false);
Aspire.Hosting.DevTunnels (2)
DevTunnelResourceBuilderExtensions.cs (2)
624await eventing.PublishAsync<ResourceEndpointsAllocatedEvent>(new(portResource, services), ct).ConfigureAwait(false); 690await eventing.PublishAsync<ResourceStoppedEvent>(new(portResource, e.Services, new(portResource, portResource.Name, stoppedSnapshot!)), ct).ConfigureAwait(false);
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
77await evt.Eventing.PublishAsync(new ConnectionStringAvailableEvent(r, evt.Services), ct)
Aspire.Hosting.Maui (1)
MauiOtlpExtensions.cs (1)
124return appBuilder.Eventing.PublishAsync(new ResourceEndpointsAllocatedEvent(stubResource, evt.Services), ct);
Aspire.Hosting.Maui.Tests (1)
MauiPlatformExtensionsTests.cs (1)
250.PublishAsync(new BeforeResourceStartedEvent(platform.Resource, app.Services), CancellationToken.None);
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.OpenAI (2)
OpenAIExtensions.cs (2)
89await evt.Eventing.PublishAsync(new ConnectionStringAvailableEvent(r, evt.Services), ct) 132await evt.Eventing.PublishAsync(new ConnectionStringAvailableEvent(r, evt.Services), ct)
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
2278await eventing.PublishAsync(new BeforeStartEvent(app.Services, appModel), CancellationToken.None);
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));
Aspire.Hosting.Tests (1)
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
303await eventing.PublishAsync(testEvent, CancellationToken.None);
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);