Exemplo n.º 1
0
 /// <summary>
 /// 重新加载全部的Smtp设置
 /// </summary>
 /// <returns></returns>
 public static IEnumerable<SmtpSettings> ReLoadSmtpSettings(this EmailService service)
 {
     ISmtpSettingsRepository smtpSettingsRepository = new SmtpSettingsRepository();
     IEnumerable<SmtpSettings> smtpSettings = smtpSettingsRepository.GetAll();
     EmailService.AllSmtpSettings = smtpSettings == null ? new List<SmtpSettings>() : smtpSettings.Select(n => new SmtpSettingsChild(n) as SmtpSettings).ToList();
     return EmailService.AllSmtpSettings;
 }
Exemplo n.º 2
0
        /// <summary>
        /// 重新加载全部的Smtp设置
        /// </summary>
        /// <returns></returns>
        public static IEnumerable <SmtpSettings> ReLoadSmtpSettings(this EmailService service)
        {
            ISmtpSettingsRepository    smtpSettingsRepository = new SmtpSettingsRepository();
            IEnumerable <SmtpSettings> smtpSettings           = smtpSettingsRepository.GetAll();

            EmailService.AllSmtpSettings = smtpSettings == null ? new List <SmtpSettings>() : smtpSettings.Select(n => new SmtpSettingsChild(n) as SmtpSettings).ToList();
            return(EmailService.AllSmtpSettings);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取全部的Smtp设置
        /// </summary>
        /// <param name="service"></param>
        /// <returns></returns>
        public static IEnumerable <SmtpSettings> GetAll(this EmailService service)
        {
            ISmtpSettingsRepository smtpSettingsRepository = new SmtpSettingsRepository();

            return(smtpSettingsRepository.GetAll());
        }
Exemplo n.º 4
0
 /// <summary>
 /// 获取全部的Smtp设置
 /// </summary>
 /// <param name="service"></param>
 /// <returns></returns>
 public static IEnumerable<SmtpSettings> GetAll(this EmailService service)
 {
     ISmtpSettingsRepository smtpSettingsRepository = new SmtpSettingsRepository();
     return smtpSettingsRepository.GetAll();
 }