Пример #1
0
 public LivenessRunner(LivenessDb context,
                       ILivenessFailureNotifier failureNotifier,
                       IOptions <BeatPulseSettings> settings,
                       ILogger <LivenessRunner> logger)
 {
     _context         = context ?? throw new ArgumentNullException(nameof(context));
     _failureNotifier = failureNotifier ?? throw new ArgumentNullException(nameof(failureNotifier));
     _settings        = settings.Value ?? throw new ArgumentNullException(nameof(settings));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #2
0
 public LivenessFailureNotifier(IOptions <BeatPulseSettings> settings, ILogger <LivenessFailureNotifier> logger)
 {
     _settings = settings.Value ?? new BeatPulseSettings();
     _logger   = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public LivenessHostedService(IServiceProvider provider, IOptions <BeatPulseSettings> settings, ILogger <LivenessHostedService> logger)
 {
     _serviceProvider = provider ?? throw new ArgumentNullException(nameof(provider));
     _logger          = logger ?? throw new ArgumentNullException(nameof(provider));
     _settings        = settings.Value ?? new BeatPulseSettings();
 }
 public WebHookFailureNotifier(LivenessDb db, IOptions <BeatPulseSettings> settings, ILogger <WebHookFailureNotifier> logger)
 {
     _db       = db ?? throw new ArgumentNullException(nameof(db));
     _settings = settings.Value ?? new BeatPulseSettings();
     _logger   = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #5
0
 public LivenessHostedService(IServiceScopeFactory serviceScopeFactory, IOptions <BeatPulseSettings> settings, ILogger <LivenessHostedService> logger)
 {
     _serviceScopeFactory = serviceScopeFactory ?? throw new ArgumentNullException(nameof(serviceScopeFactory));
     _logger   = logger ?? throw new ArgumentNullException(nameof(serviceScopeFactory));
     _settings = settings.Value ?? new BeatPulseSettings();
 }