Class UpdateService
- Namespace
- DuetControlServer.Model
- Assembly
- DuetControlServer.dll
Service to keep the object model up-to-date with the firmware
public class UpdateService : BackgroundService, IHostedService, IDisposable
- Inheritance
-
UpdateService
- Implements
- Inherited Members
Constructors
UpdateService(FirmwareUpdater, LinkInterface, ObjectModel, ILogger<UpdateService>, IOptions<Settings>)
Constructor of this class
public UpdateService(FirmwareUpdater firmwareUpdater, LinkInterface linkInterface, ObjectModel model, ILogger<UpdateService> logger, IOptions<Settings> settings)
Parameters
firmwareUpdaterFirmwareUpdaterFirmware updater
linkInterfaceLinkInterfaceLink interface
modelObjectModelObject model
loggerILogger<UpdateService>Logger
settingsIOptions<Settings>Settings
Methods
ExecuteAsync(CancellationToken)
Process status updates in the background
protected override Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingTokenCancellationToken
Returns
- Task
Asynchronous task
StopAsync(CancellationToken)
Stop the update service
public override Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenCancellation token
Returns
- Task
Asynchronous task