예제 #1
0
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            _logger.LogInformation(Resources.ServiceStarting);

            var scheduler = await _schedulerFactory.GetSchedulerAsync();

            await scheduler.Start(CancellationToken.None);

            await Task.Delay(Timeout.Infinite, stoppingToken);

            _logger.LogInformation(Resources.ServiceStopping);

            await scheduler.Shutdown(CancellationToken.None);

            _logger.LogInformation(Resources.ServiceStopped);
        }