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); }
static NancyViewEngineTests() { if (!VeilStaticConfiguration.IsParserRegistered("handlebars")) { VeilStaticConfiguration.RegisterParser(new HandlebarsTemplateParserRegistration()); } if (!VeilStaticConfiguration.IsParserRegistered("supersimple")) { VeilStaticConfiguration.RegisterParser(new SuperSimpleParserRegistration()); } }
static VeilBootstrapper() { VeilStaticConfiguration.RegisterParser(new SuperSimpleParserRegistration()); }