Files
GSS2Rework/GSS2.Test/Worker.cs
T

27 lines
841 B
C#

using System.Drawing;
using GSS2.Core.Analysis.AmineContent.Database;
using GSS2.Core.Hardware;
namespace GSS2.Test;
public class Worker(
ILogger<Worker> logger,
AmineContentCalibrationContext calibrationContext,
LightsService lightsService
) : BackgroundService
{
private readonly ILogger<Worker> _logger = logger;
private readonly AmineContentCalibrationContext _calibrationContext = calibrationContext;
private readonly LightsService _lightsService = lightsService;
protected override async Task ExecuteAsync(CancellationToken cancellationToken)
{
_ = _lightsService.Run(cancellationToken);
_ = _lightsService.SnowfallAsync(0.3, 1, Color.Aqua, cancellationToken);
while (!cancellationToken.IsCancellationRequested)
{
await Task.Delay(5000);
}
}
}