public VideoCacheProcessingService( IVideoRepository repo, IVideoCache cache, IDelayCalculator delayCalculator, ILogger <VideoCacheProcessingService> logger) { _repo = repo ?? throw new ArgumentNullException(nameof(repo)); _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _delay = delayCalculator ?? throw new ArgumentNullException(nameof(delayCalculator)); _logger = logger ?? throw new ArgumentNullException(nameof(logger));; }
/// <summary> /// Initializes a new instance of the <see cref="PumpProcessor" /> class. /// </summary> /// <param name="loggerFactory">The logger factory.</param> /// <param name="buffer">The buffer.</param> /// <param name="stopwatchFactory">The stopwatch factory.</param> /// <param name="delayCalculator">The delay calculator.</param> /// <param name="scheduleSettings">The schedule settings.</param> public PumpProcessor( [NotNull] ILoggerFactory loggerFactory, [NotNull] IBuffer buffer, [NotNull] IStopwatchFactory stopwatchFactory, [NotNull] IDelayCalculator delayCalculator, [NotNull] ScheduleSettings scheduleSettings) { this.buffer = buffer; this.stopwatchFactory = stopwatchFactory; this.delayCalculator = delayCalculator; this.scheduleSettings = scheduleSettings; this.logger = loggerFactory.CreateLogger <PumpProcessor>(); }