Exemple #1
0
 public static void RegisterHelper(IBlockHelper helper, string helperName = null)
 {
     helperName = helperName ?? helper.GetType().Name;
     Engine.Value.RegisterHelper(helperName, (tw, opts, ctx, args) => helper.Run(tw, opts, ctx, args));
 }
Exemple #2
0
 public static void RegisterHelper(IBlockHelper helper, string helperName = null)
 {
     helperName = helperName ?? helper.GetType().Name;
     Engine.Value.RegisterHelper(helperName, (tw, opts, ctx, args) => helper.Run(tw, opts, ctx, args));
 }