private static void RegisterFilters(ILavaEngine engine) { // Register the common Rock.Lava filters first, then overwrite with the web-specific filters. if (engine.GetType() == typeof(RockLiquidEngine)) { engine.RegisterFilters(typeof(global::Rock.Lava.Filters.TemplateFilters)); engine.RegisterFilters(typeof(Rock.Lava.RockFilters)); } else { engine.RegisterFilters(typeof(global::Rock.Lava.Filters.TemplateFilters)); engine.RegisterFilters(typeof(Rock.Lava.LavaFilters)); } }
private static void RegisterFilters(ILavaEngine engine) { // Register the common Rock.Lava filters first, then overwrite with the web-specific filters. if (engine.EngineIdentifier == TestGuids.LavaEngines.RockLiquid.AsGuid()) { engine.RegisterFilters(typeof(global::Rock.Lava.Filters.TemplateFilters)); engine.RegisterFilters(typeof(global::Rock.Lava.RockFilters)); } else { engine.RegisterFilters(typeof(global::Rock.Lava.Filters.TemplateFilters)); engine.RegisterFilters(typeof(global::Rock.Lava.LavaFilters)); } }
/// <summary> /// Register one or more filter functions that are implemented by the supplied Type. /// A filter must be defined as a public static function that returns a string. /// </summary> /// <param name="implementingType"></param> public static void RegisterFilters(Type implementingType) { if (_engine == null) { return; } _engine.RegisterFilters(implementingType); }
private static void InitializeLavaFilters(ILavaEngine engine) { // Register the common Rock.Lava filters first, then overwrite with the engine-specific filters. engine.RegisterFilters(typeof(Rock.Lava.Filters.TemplateFilters)); engine.RegisterFilters(typeof(Rock.Lava.LavaFilters)); }