Files
DMS/Services/DemoBackgroundService.cs

21 lines
572 B
C#
Raw Normal View History

using Microsoft.Extensions.Hosting;
2025-05-29 08:58:58 +08:00
namespace PMSWPF.Services;
2025-05-29 08:58:58 +08:00
internal class DemoBackgroundService : BackgroundService
{
private int count = 0;
2025-05-29 08:58:58 +08:00
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
// while (!stoppingToken.IsCancellationRequested)
// {
// await Task.Delay(1000);
// count += 1;
// var msg = new MyMessage(35) { Count = count };
// WeakReferenceMessenger.Default.Send<MyMessage>(msg);
// Console.WriteLine("Hello");
// }
2025-05-29 08:58:58 +08:00
}
}