1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-22 14:15:37 +01:00
GiantsTools/Giants.Services/Services/InitializerService.cs

27 lines
704 B
C#
Raw Normal View History

2020-08-09 02:26:41 +02:00
namespace Giants.Services
2020-08-09 01:31:16 +02:00
{
2020-08-09 02:26:41 +02:00
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
2020-08-09 02:52:26 +02:00
public class InitializerService : IHostedService
2020-08-09 01:31:16 +02:00
{
private readonly IServerRegistryStore serverRegistryStore;
2020-08-09 02:52:26 +02:00
public InitializerService(IServerRegistryStore serverRegistryStore)
2020-08-09 01:31:16 +02:00
{
this.serverRegistryStore = serverRegistryStore;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
await this.serverRegistryStore.Initialize();
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}
}