public void Reload() { try { // 创建数据服务对象 this.provider = SpringContext.Instance.GetObject <IEmailClientProvider>(typeof(IEmailClientProvider)); } catch (Exception ex) { KernelContext.Log.Error(ex.Message, ex); } }
public EmailNotificationService(IEmailClientProvider emailClientProvider, INotificationTemplateService notificationTemplateService) { _emailClientProvider = emailClientProvider ?? throw new ArgumentNullException(nameof(emailClientProvider)); _notificationTemplateService = notificationTemplateService ?? throw new ArgumentNullException(nameof(notificationTemplateService)); }