private static void RegisterLavaEngines() { // Register the RockLiquid Engine (pre-v13). LavaService.RegisterEngine((engineServiceType, options) => { var engine = new RockLiquidEngine(); engine.Initialize(options as LavaEngineConfigurationOptions); // Initialize the RockLiquid Engine RegisterFilters(engine); RegisterTags(engine); RegisterBlocks(engine); RegisterStaticShortcodes(engine); RegisterDynamicShortcodes(engine); return(engine); }); // Register the DotLiquid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var engine = new DotLiquidEngine(); engine.Initialize(options as LavaEngineConfigurationOptions); // Initialize the DotLiquid Engine RegisterFilters(engine); RegisterTags(engine); RegisterBlocks(engine); RegisterStaticShortcodes(engine); RegisterDynamicShortcodes(engine); return(engine); }); // Register the Fluid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var engine = new FluidEngine(); engine.Initialize(options as LavaEngineConfigurationOptions); // Initialize Fluid Engine RegisterFilters(engine); RegisterTags(engine); RegisterBlocks(engine); RegisterStaticShortcodes(engine); RegisterDynamicShortcodes(engine); return(engine); }); }
private static void InitializeLavaEngines() { // Register the RockLiquid Engine (pre-v13). LavaService.RegisterEngine((engineServiceType, options) => { var engineOptions = new LavaEngineConfigurationOptions(); var rockLiquidEngine = new RockLiquidEngine(); rockLiquidEngine.Initialize(engineOptions); return(rockLiquidEngine); }); // Register the DotLiquid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var defaultEnabledLavaCommands = GlobalAttributesCache.Value("DefaultEnabledLavaCommands").SplitDelimitedValues(",").ToList(); var engineOptions = new LavaEngineConfigurationOptions { FileSystem = new WebsiteLavaFileSystem(), CacheService = new WebsiteLavaTemplateCacheService(), DefaultEnabledCommands = defaultEnabledLavaCommands }; var dotLiquidEngine = new DotLiquidEngine(); dotLiquidEngine.Initialize(engineOptions); return(dotLiquidEngine); }); // Register the Fluid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var defaultEnabledLavaCommands = GlobalAttributesCache.Value("DefaultEnabledLavaCommands").SplitDelimitedValues(",").ToList(); var engineOptions = new LavaEngineConfigurationOptions { FileSystem = new WebsiteLavaFileSystem(), CacheService = new WebsiteLavaTemplateCacheService(), DefaultEnabledCommands = defaultEnabledLavaCommands }; var fluidEngine = new FluidEngine(); fluidEngine.Initialize(engineOptions); return(fluidEngine); }); }
private static void RegisterLavaEngines() { // Register the RockLiquid Engine (pre-v13). LavaService.RegisterEngine((engineServiceType, options) => { var engineOptions = new LavaEngineConfigurationOptions(); var rockLiquidEngine = new RockLiquidEngine(); rockLiquidEngine.Initialize(engineOptions); return(rockLiquidEngine); }); // Register the DotLiquid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var engineOptions = GetCurrentEngineOptions(); var dotLiquidEngine = new DotLiquidEngine(); dotLiquidEngine.Initialize(engineOptions); return(dotLiquidEngine); }); // Register the Fluid Engine. LavaService.RegisterEngine((engineServiceType, options) => { var engineOptions = GetCurrentEngineOptions(); var fluidEngine = new FluidEngine(); fluidEngine.Initialize(engineOptions); return(fluidEngine); }); }