Class ConfigServerHostedService
- Namespace
- Steeltoe.Extensions.Configuration.ConfigServer
- Assembly
- Steeltoe.Extensions.Configuration.ConfigServerBase.dll
Replace bootstrapped components used by ConfigServerConfigurationProvider with objects provided by Dependency Injection
public class ConfigServerHostedService : IHostedService
- Inheritance
-
ConfigServerHostedService
- Implements
- Inherited Members
Constructors
ConfigServerHostedService(IConfigurationRoot, ILoggerFactory, IDiscoveryClient)
public ConfigServerHostedService(IConfigurationRoot configuration, ILoggerFactory loggerFactory, IDiscoveryClient discoveryClient = null)
Parameters
configuration
IConfigurationRootloggerFactory
ILoggerFactorydiscoveryClient
IDiscoveryClient
Methods
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenIndicates that the start process has been aborted.
Returns
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenIndicates that the shutdown process should no longer be graceful.