public VelocityTemplateEngine(PipelineContext context, Configuration.Template template, IReader templateReader) { VelocityInitializer.Init(); _context = context; _template = template; _templateReader = templateReader; }
public RazorTemplateEngine(IContext context, Configuration.Template template, IReader templateReader) { _context = context; _template = template; _templateReader = templateReader; _engine = new RazorEngine(); }
public RazorTemplateEngine(PipelineContext context, Configuration.Template template, IReader templateReader) { _context = context; _template = template; _templateReader = templateReader; var config = new FluentTemplateServiceConfiguration( c => c.WithEncoding(_template.ContentType == "html" ? Encoding.Html : Encoding.Raw) .WithCodeLanguage(Language.CSharp) ); _service = RazorEngineService.Create(config); }
public OrchardRazorTemplateEngine( PipelineContext context, ITemplateProcessor templateProcessor, Configuration.Template template, IReader templateReader) { _context = context; _templateProcessor = templateProcessor; _template = template; _templateReader = templateReader; }
public RazorTemplateEngine(PipelineContext context, Configuration.Template template, IReader templateReader) { _context = context; _template = template; _templateReader = templateReader; var config = new TemplateServiceConfiguration { EncodedStringFactory = _template.ContentType == "html" ? (IEncodedStringFactory) new HtmlEncodedStringFactory() : new RawStringFactory(), Language = Language.CSharp, CachingProvider = new DefaultCachingProvider(t => { }) }; _service = RazorEngineService.Create(config); }