public void FuManchuTest_separate() { HandlebarTemplate compile = null; Clock.Benchmark("FuManchu. Handlebars compile", () => { compile = Handlebars.Compile("<template-name>", template); compile(context); }, iteration); Clock.Benchmark("FuManchu. Handlebars run ", () => { compile(context); }, iteration); }
/// <inheritdoc /> public string CompileAndRun(string name, string template, object model = null, UnknownValueResolver unknownValueResolver = null) { HandlebarTemplate func = (string.IsNullOrEmpty(name)) ? Compile(template) : Compile(name, template); return(func(model, unknownValueResolver)); }