25 references to WaitBehavior
Aspire.Hosting (25)
ApplicationModel\ResourceNotificationService.cs (17)
32
internal
WaitBehavior
DefaultWaitBehavior { get; set; }
53
DefaultWaitBehavior =
WaitBehavior
.StopOnResourceUnavailable;
72
DefaultWaitBehavior = serviceProvider.GetService<IOptions<ResourceNotificationServiceOptions>>()?.Value.DefaultWaitBehavior ??
WaitBehavior
.StopOnResourceUnavailable;
142
private async Task WaitUntilHealthyAsync(IResource resource, IResource dependency,
WaitBehavior
waitBehavior, CancellationToken cancellationToken)
164
if (waitBehavior ==
WaitBehavior
.StopOnResourceUnavailable)
208
static bool IsContinuableState(
WaitBehavior
waitBehavior, CustomResourceSnapshot snapshot) =>
211
WaitBehavior
.WaitOnResourceUnavailable => snapshot.State?.Text == KnownResourceStates.Running,
212
WaitBehavior
.StopOnResourceUnavailable => snapshot.State?.Text == KnownResourceStates.Running ||
237
/// control this behavior use <see cref="WaitForResourceHealthyAsync(string,
WaitBehavior
, CancellationToken)"/>
261
/// <see cref="
WaitBehavior
"/> controls how the wait operation behaves when the resource
265
/// When <see cref="
WaitBehavior
.WaitOnResourceUnavailable"/> is specified the wait operation
269
/// When <see cref="
WaitBehavior
.StopOnResourceUnavailable"/> is specified the wait operation
274
public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName,
WaitBehavior
waitBehavior, CancellationToken cancellationToken = default)
290
static bool ShouldYield(
WaitBehavior
waitBehavior, CustomResourceSnapshot snapshot) =>
293
WaitBehavior
.WaitOnResourceUnavailable => snapshot.HealthStatus == HealthStatus.Healthy,
294
WaitBehavior
.StopOnResourceUnavailable => snapshot.HealthStatus == HealthStatus.Healthy ||
766
public
WaitBehavior
DefaultWaitBehavior { get; set; }
ApplicationModel\WaitAnnotation.cs (1)
33
public
WaitBehavior
? WaitBehavior { get; init; }
DistributedApplicationBuilder.cs (2)
214
o.DefaultWaitBehavior = options.DisableDashboard ?
WaitBehavior
.StopOnResourceUnavailable :
WaitBehavior
.WaitOnResourceUnavailable;
ResourceBuilderExtensions.cs (5)
748
/// resources, calling <see cref="WaitFor{T}(IResourceBuilder{T}, IResourceBuilder{IResource},
WaitBehavior
)"/> also results
754
/// wait operation. When <see cref="
WaitBehavior
.WaitOnResourceUnavailable"/> is specified, the wait
757
/// <para>When <see cref="
WaitBehavior
.StopOnResourceUnavailable"/> is specified, the wait operation
770
public static IResourceBuilder<T> WaitFor<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency,
WaitBehavior
waitBehavior) where T : IResourceWithWaitSupport
778
private static IResourceBuilder<T> WaitForCore<T>(this IResourceBuilder<T> builder, IResourceBuilder<IResource> dependency,
WaitBehavior
? waitBehavior, bool addRelationship) where T : IResourceWithWaitSupport