[CHANGE] Reworked ExtendedBackgroundService.cs with State logic and actions

This commit is contained in:
max
2025-10-08 18:22:16 +02:00
parent b8d2573d78
commit 2f19d60be0
7 changed files with 230 additions and 86 deletions

View File

@@ -0,0 +1,16 @@
namespace Manager.App.Services.System;
public class SettingsService(ILogger<SettingsService> logger) : ExtendedBackgroundService(nameof(SettingsService), "Service for handling application settings.", logger, TimeSpan.FromMinutes(10))
{
protected override async Task InitializeAsync(CancellationToken stoppingToken)
{
AddActions([
new ServiceAction("Save settings", "Save the application settings to the database", () => { }, () => true)
]);
}
protected override async Task ExecuteServiceAsync(CancellationToken stoppingToken)
{
}
}