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