internal void GenerateForTemplate(string templateId, string template, IClientContext clientContext, IClientModel model)
        {
            var parser         = VeilStaticConfiguration.GetParserInstance("handlebars");
            var helperHandlers = _helperHandlerFactory.Create().ToArray();

            var tree = parser.Parse(templateId, new StringReader(template), typeof(object), _memberLocator, helperHandlers);

            new ClientNodeVisitor(clientContext, model).Visit(tree);
        }
Esempio n. 2
0
 static NancyViewEngineTests()
 {
     if (!VeilStaticConfiguration.IsParserRegistered("handlebars"))
     {
         VeilStaticConfiguration.RegisterParser(new HandlebarsTemplateParserRegistration());
     }
     if (!VeilStaticConfiguration.IsParserRegistered("supersimple"))
     {
         VeilStaticConfiguration.RegisterParser(new SuperSimpleParserRegistration());
     }
 }
Esempio n. 3
0
 static VeilBootstrapper()
 {
     VeilStaticConfiguration.RegisterParser(new SuperSimpleParserRegistration());
 }