Class NltgDaemonService
- Namespace
- NLightning.Node.Services
- Assembly
- NLightning.Node.dll
public class NltgDaemonService : BackgroundService, IHostedService, IDisposable
- Inheritance
-
NltgDaemonService
- Implements
- Inherited Members
Constructors
NltgDaemonService(IBlockchainMonitor, IConfiguration, IFeeService, ILogger<NltgDaemonService>, IOptions<NodeOptions>, IPeerManager, ISecureKeyManager)
public NltgDaemonService(IBlockchainMonitor blockchainMonitor, IConfiguration configuration, IFeeService feeService, ILogger<NltgDaemonService> logger, IOptions<NodeOptions> nodeOptions, IPeerManager peerManager, ISecureKeyManager secureKeyManager)
Parameters
blockchainMonitor
IBlockchainMonitorconfiguration
IConfigurationfeeService
IFeeServicelogger
ILogger<NltgDaemonService>nodeOptions
IOptions<NodeOptions>peerManager
IPeerManagersecureKeyManager
ISecureKeyManager
Methods
ExecuteAsync(CancellationToken)
This method is called when the IHostedService starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingToken
CancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public override Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenIndicates that the shutdown process should no longer be graceful.