public ServiceMonitoringController( IServiceMonitoring serviceMonitoring, IMailService mailService) { if (serviceMonitoring == null) { throw new ArgumentNullException(nameof(serviceMonitoring)); } if (mailService == null) { throw new ArgumentNullException(nameof(mailService)); } this.serviceMonitoring = serviceMonitoring; this.mailService = mailService; }
public ScheduleReport( string shift, IServiceMonitoring serviceMonitoring, IMailService mailService) { if (serviceMonitoring == null) { throw new ArgumentNullException(nameof(serviceMonitoring)); } if (mailService == null) { throw new ArgumentNullException(nameof(mailService)); } this.shift = shift ?? throw new ArgumentNullException(nameof(shift)); this.serviceMonitoring = serviceMonitoring; this.mailService = mailService; }