public static Strainer Create(Context context) { Strainer strainer = new Strainer(context); foreach (var keyValue in Filters) strainer.Extend(keyValue.Value); return strainer; }
public static Strainer Create(Context context) { Strainer strainer = new Strainer(context); foreach (var keyValue in Filters) { strainer.Extend(keyValue.Value); } return(strainer); }
public static Strainer Create(Context context) { var strainer = new Strainer(context); foreach (KeyValuePair <string, Type> keyValue in Filters) { strainer.Extend(keyValue.Value); } foreach (KeyValuePair <string, Tuple <object, MethodInfo> > keyValue in FilterFuncs) { strainer.AddMethodInfo(keyValue.Key, keyValue.Value.Item1, keyValue.Value.Item2); } return(strainer); }
public static Strainer Create(Context context) { Strainer strainer = new Strainer(context); foreach (var keyValue in Filters) { strainer.Extend(keyValue.Value); } foreach (var keyValue in FilterFuncs) { strainer.AddMethodInfo(keyValue.Key, keyValue.Value.Item1, keyValue.Value.Item2); } return(strainer); }
/// <summary> /// Pass a module with filter methods which should be available /// to all liquid views. Good for registering the standard library /// </summary> /// <param name="filter"></param> public static void RegisterFilter(Type filter) { Strainer.GlobalFilter(filter); }