Condividi tramite


ResourceNotificationService.WaitForResourceHealthyAsync Method

Definition

Waits for a resource to become healthy.

public System.Threading.Tasks.Task<Aspire.Hosting.ApplicationModel.ResourceEvent> WaitForResourceHealthyAsync (string resourceName, System.Threading.CancellationToken cancellationToken = default);
member this.WaitForResourceHealthyAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Aspire.Hosting.ApplicationModel.ResourceEvent>
Public Function WaitForResourceHealthyAsync (resourceName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ResourceEvent)

Parameters

resourceName
String

The name of the resource.

cancellationToken
CancellationToken

The cancellation token.

Returns

A task.

Remarks

This method returns a task that will complete with the resource is healthy. A resource without HealthCheckAnnotation annotations will be considered healthy.

Applies to