public TestJob(IOptionsMonitor <TestJobOptions> options, ILogger <TestJob> logger) : base(options.CurrentValue) { _options = options.CurrentValue; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public TestJob(IOptionsMonitor <TestJobOptions> options, ILogger <TestJob> logger, IHostLifetime lifetime) : base(options.CurrentValue) { _options = options.CurrentValue; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); // _logger.LogInformation("IsSystemd: {isSystemd}", lifetime.GetType() == typeof(SystemdLifetime)); _logger.LogInformation("IHostLifetime: {hostLifetime}", lifetime.GetType()); }