private static Tuple <IEngineCore, IPageLookup> CreateDefaultDependencies( ITemplateManager manager, IEngineConfiguration configuration) { IEngineCore core = new EngineCore(manager, configuration); IPageFactoryProvider pageFactory = new DefaultPageFactory(core.KeyCompile); IPageLookup lookup = new DefaultPageLookup(pageFactory); return(new Tuple <IEngineCore, IPageLookup>(core, lookup)); }
public RazorViewMailService( GlobalSettings globalSettings, IMailDeliveryService mailDeliveryService) { _globalSettings = globalSettings; _mailDeliveryService = mailDeliveryService; var manager = new CustomEmbeddedResourceTemplateManager("Bit.Core.MailTemplates"); var core = new EngineCore(manager, EngineConfiguration.Default); var pageFactory = new DefaultPageFactory(core.KeyCompile); var lookup = new DefaultPageLookup(pageFactory); _engine = new RazorLightEngine(core, lookup); }