/// <summary> /// Invokes a strainer method /// </summary> /// <param name="method"></param> /// <param name="args"></param> /// <returns></returns> public object Invoke(string method, List <object> args) { if (Strainer.RespondTo(method)) { return(Strainer.Invoke(method, args)); } return(args.First()); }
/// <summary> /// Invokes a strainer method /// </summary> /// <param name="method"></param> /// <param name="args"></param> /// <returns></returns> public object Invoke(string method, List <object> args) { if (Strainer.RespondTo(method)) { return(Strainer.Invoke(method, args)); } if (SyntaxCompatibilityLevel >= SyntaxCompatibility.DotLiquid22) { throw new FilterNotFoundException(method); // this will be caught and rethrown in caller with correct message } return(args.First()); }