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;
        }
Esempio n. 2
0
        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;
        }