예제 #1
0
        public string Render(string name, object context)
        {
            var json = context is string?(string)context : HandlebarsUtilities.ToJson(context);

            return((string)_context.Evaluate("Handlebars.templates['" + name + "'](" + json + ");"));
        }
예제 #2
0
        public string Render(string name, string template, object context)
        {
            string json = context is string?(string)context : HandlebarsUtilities.ToJson(context);

            return(Render(name, template, json));
        }
예제 #3
0
 public string Render(string name, string template, object context)
 {
     return(Render(name, template, HandlebarsUtilities.ToJson(context)));
 }