25 references to ResourceEvent
Aspire.Hosting (15)
ApplicationModel\ResourceNotificationService.cs (11)
26private Action<ResourceEvent>? OnResourceUpdated { get; set; } 110await foreach (var resourceEvent in WatchAsync(watchToken).ConfigureAwait(false)) 181public Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, CancellationToken cancellationToken = default) 269/// <param name="predicate">A predicate which is evaluated for each <see cref="ResourceEvent"/> for the selected resource.</param> 274public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 278await foreach (var resourceEvent in WatchAsync(watchToken).ConfigureAwait(false)) 297public async IAsyncEnumerable<ResourceEvent> WatchAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) 310var channel = Channel.CreateUnbounded<ResourceEvent>(); 312void WriteToChannel(ResourceEvent resourceEvent) => 322await foreach (var item in channel.Reader.ReadAllAsync(cancellationToken).ConfigureAwait(false))
Dashboard\DashboardServiceData.cs (1)
66await foreach (var @event in resourceNotificationService.WatchAsync().WithCancellation(cancellationToken).ConfigureAwait(false))
Health\ResourceHealthCheckService.cs (3)
15private readonly Dictionary<string, ResourceEvent> _latestEvents = new(); 42private async Task MonitorResourceHealthAsync(ResourceEvent initialEvent, CancellationToken cancellationToken) 114async Task SlowDownMonitoringAsync(ResourceEvent lastEvent, CancellationToken cancellationToken)
Aspire.Hosting.Testing.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
123await foreach (var resourceEvent in resourceNotificationService.WatchAsync(cancellationTokenSource.Token).ConfigureAwait(false))
Aspire.Hosting.Tests (8)
Dcp\ApplicationExecutorTests.cs (1)
85await foreach (var item in resourceNotificationService.WatchAsync())
ResourceNotificationTests.cs (6)
50async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 52var values = new List<ResourceEvent>(); 54await foreach (var item in notificationService.WatchAsync(cancellationToken)) 101async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellation) 103var values = new List<ResourceEvent>(); 105await foreach (var item in notificationService.WatchAsync(cancellation))
Utils\LoggerNotificationExtensions.cs (1)
123await foreach (var resourceEvent in resourceNotificationService.WatchAsync(cancellationTokenSource.Token).ConfigureAwait(false))
Aspire.Playground.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
123await foreach (var resourceEvent in resourceNotificationService.WatchAsync(cancellationTokenSource.Token).ConfigureAwait(false))