public LicalizedTemplateLocator(TemplateLocatorSettings templateLocatorSettings) { if (templateLocatorSettings == null) { throw new ArgumentNullException("templateLocatorSettings"); } _templateLocatorSettings = templateLocatorSettings; }
public static void InitNotification(Container container) { var mailSettings = new MailSettings { SmtpOptions = new SmtpOptions() }; var templateLocatorSettings = new TemplateLocatorSettings(); container.Register <INotificationManager>(c => new NotificationManager()); container.Resolve <INotificationManager>().DeliveryMethodProvider .Register("email", new EmailDeliveryMethod(mailSettings)); container.Resolve <INotificationManager>().MessageGeneratorProvider .Register("email", new RazorMessageGenerator(templateLocatorSettings)); }
public RazorMessageGenerator(TemplateLocatorSettings templateLocatorSettings) : this(new LicalizedTemplateLocator(templateLocatorSettings)) { }