예제 #1
0
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            _logger.LogInformation("Running startup actions...");
            await _serviceProvider.RunStartupActionsAsync(stoppingToken).ConfigureAwait(false);

            _logger.LogInformation("Startup actions complete.");
            _startupContext.MarkStartupComplete();
        }
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            var success = await _serviceProvider.RunStartupActionsAsync(stoppingToken).AnyContext();

            if (success)
            {
                _startupContext.MarkStartupComplete();
            }
            else
            {
                _startupContext.MarkStartupFailure();
            }
        }