ResourceNotificationService
Class net10.0
A service that allows publishing and subscribing to changes in the state of a resource.
namespace Aspire.Hosting.ApplicationModel;
public class ResourceNotificationService : System.IDisposable{ // ...} IDisposable
13 members
Constructors2
Section titled ConstructorsResourceNotificationService(ILogger<ResourceNotificationService>, IHostApplicationLifetime)obsolete Creates a new instance of
ResourceNotificationService. ResourceNotificationService(ILogger<ResourceNotificationService>, IHostApplicationLifetime, IServiceProvider, ResourceLoggerService) Creates a new instance of
ResourceNotificationService. Methods11
Section titled MethodsDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
PublishUpdateAsync(IResource, string, Func<CustomResourceSnapshot, CustomResourceSnapshot>)Task Updates the snapshot of the
CustomResourceSnapshot for a resource. PublishUpdateAsync(IResource, Func<CustomResourceSnapshot, CustomResourceSnapshot>)Task Updates the snapshot of the
CustomResourceSnapshot for a resource. TryGetCurrentState(string, ResourceEvent?)bool Attempts to retrieve the current state of a resource by resourceId.
WaitForDependenciesAsync(IResource, CancellationToken)Task Waits for all dependencies of the resource to be ready.
WaitForResourceAsync(string, string?, CancellationToken)Task Waits for a resource to reach the specified state. See
KnownResourceStates for common states. WaitForResourceAsync(string, IEnumerable<string>, CancellationToken)Task<string> Waits for a resource to reach one of the specified states. See
KnownResourceStates for common states. WaitForResourceAsync(string, Func<ResourceEvent, bool>, CancellationToken) Waits until a resource satisfies the specified predicate.
WaitForResourceHealthyAsync(string, CancellationToken) Waits for a resource to become healthy.
WaitForResourceHealthyAsync(string, WaitBehavior, CancellationToken) Waits for a resource to become healthy.
WatchAsync(CancellationToken) Watch for changes to the state for all resources.