public HandlebarsEnvironment(HandlebarsConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            _compiler = new HandlebarsCompiler(configuration);

            Configuration = configuration;
            RegisterBuiltinHelpers();
        }
示例#2
0
 public static IHandlebars Create(HandlebarsConfiguration configuration = null)
 {
     configuration = configuration ?? new HandlebarsConfiguration();
     return(new HandlebarsEnvironment(configuration));
 }
示例#3
0
 static HandlebarsConfiguration()
 {
     instance = new HandlebarsConfiguration();
     instance.GetFromFile();
 }
 static HandlebarsConfiguration()
 {
     instance = new HandlebarsConfiguration();
     instance.GetFromFile();
 }