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();
 }