32 references to PublishAsync
Aspire.Hosting (18)
Dcp\DcpExecutor.cs (18)
163await _executorEvents.PublishAsync(new OnResourcesPreparedContext(cancellationToken)).ConfigureAwait(false); 184await _executorEvents.PublishAsync(new OnEndpointsAllocatedContext(cancellationToken)).ConfigureAwait(false); 452await _executorEvents.PublishAsync(new OnResourceChangedContext(_shutdownCancellation.Token, resourceType, appModelResource, resource.Metadata.Name, status, s => snapshotFactory(resource, s))).ConfigureAwait(false); 722await _executorEvents.PublishAsync(new OnResourceChangedContext(_shutdownCancellation.Token, resourceKind, appModelResource, resourceName, status, s => 1449await _executorEvents.PublishAsync(new OnResourceChangedContext( 1456await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, resourceType, resource, DcpResourceName: null)).ConfigureAwait(false); 1462await _executorEvents.PublishAsync(new OnResourceChangedContext(cancellationToken, resourceType, resource, er.DcpResource.Metadata.Name, new ResourceStatus(KnownResourceStates.NotStarted, null, null), s => s with { State = new ResourceStateSnapshot(KnownResourceStates.NotStarted, null) })).ConfigureAwait(false); 1475await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, er.ModelResource, er.DcpResource.Metadata.Name)).ConfigureAwait(false); 1483await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, er.ModelResource, er.DcpResource.Metadata.Name)).ConfigureAwait(false); 1494await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, resource, DcpResourceName: null)).ConfigureAwait(false); 1721await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResourceName)).ConfigureAwait(false); 1726await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResourceName)).ConfigureAwait(false); 1736await _executorEvents.PublishAsync(new OnResourceChangedContext(_shutdownCancellation.Token, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResourceName, new ResourceStatus(null, null, null), s => _snapshotBuilder.ToSnapshot((Container)cr.DcpResource, s))).ConfigureAwait(false); 1760await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, KnownResourceTypes.Container, cr.ModelResource, cr.DcpResource.Metadata.Name)).ConfigureAwait(false); 2100await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResourceName)).ConfigureAwait(false); 2106await _executorEvents.PublishAsync(new OnResourceStartingContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResourceName)).ConfigureAwait(false); 2119await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResourceName)).ConfigureAwait(false); 2124await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, appResource.ModelResource, appResource.DcpResourceName)).ConfigureAwait(false);
Aspire.Hosting.Tests (14)
Orchestrator\ApplicationOrchestratorTests.cs (14)
64await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 111await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 151await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 218await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 278await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 325await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 394await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None, KnownResourceTypes.Container, parentResource.Resource, parentResource.Resource.Name)); 597await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 600await events.PublishAsync(new OnResourceChangedContext( 643await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 646await events.PublishAsync(new OnResourceChangedContext( 717await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 773await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 822await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None));