Skip to content
DocsTry Aspire
DocsTry

ResourceNotificationService Constructors

ClassConstructors2 members
A service that allows publishing and subscribing to changes in the state of a resource.
Constructor(ILogger<ResourceNotificationService>, IHostApplicationLifetime)Section titled Constructor(ILogger<ResourceNotificationService>, IHostApplicationLifetime)
Creates a new instance of ResourceNotificationService.
public class ResourceNotificationService
{
public ResourceNotificationService(
ILogger<ResourceNotificationService> logger,
IHostApplicationLifetime hostApplicationLifetime)
{
// ...
}
}
loggerILogger<ResourceNotificationService>The logger.
hostApplicationLifetimeIHostApplicationLifetimeThe host application lifetime.
Obsolete. Use the constructor that accepts an Logging.ILogger`1, Hosting.IHostApplicationLifetime and IServiceProvider. This constructor will be removed in the next major version of Aspire.
Constructor(ILogger<ResourceNotificationService>, IHostApplicationLifetime, IServiceProvider, ResourceLoggerService)Section titled Constructor(ILogger<ResourceNotificationService>, IHostApplicationLifetime, IServiceProvider, ResourceLoggerService)
Creates a new instance of ResourceNotificationService.
public class ResourceNotificationService
{
public ResourceNotificationService(
ILogger<ResourceNotificationService> logger,
IHostApplicationLifetime hostApplicationLifetime,
IServiceProvider serviceProvider,
ResourceLoggerService resourceLoggerService)
{
// ...
}
}
loggerILogger<ResourceNotificationService>The logger.
hostApplicationLifetimeIHostApplicationLifetimeThe host application lifetime.
serviceProviderIServiceProviderThe service provider.
resourceLoggerServiceResourceLoggerServiceThe resource logger service.