示例#1
0
        public SmsLogger(ISettingRepository settingRepository, IEmailService emailService)
        {
            Argument.NotNull(settingRepository, "settingRepository");
            Argument.NotNull(emailService, "emailService");

            _emailService = emailService;
            _settings     = settingRepository.GetOrDefault <SmsLoggerSettings>();
            if (_settings == null)
            {
                throw new InvalidOperationException("Settings for sms logger were not found.");
            }
        }
示例#2
0
        public SmsLogger(ISettingRepository settingRepository, IEmailService emailService)
        {
            Argument.NotNull(settingRepository, "settingRepository");
            Argument.NotNull(emailService, "emailService");

            _emailService = emailService;
            _settings = settingRepository.GetOrDefault<SmsLoggerSettings>();
            if (_settings == null)
            {
                throw new InvalidOperationException("Settings for sms logger were not found.");
            }
        }