public static object Interpret(LambdaExpression lambda, object [] arguments) { var interpreter = new ExpressionInterpreter(lambda, arguments); interpreter.Visit(lambda.Body); if (lambda.GetReturnType() != typeof(void)) { return(interpreter.Pop()); } return(null); }
public static object Interpret (LambdaExpression lambda, object [] arguments) { var interpreter = new ExpressionInterpreter (lambda, arguments); interpreter.Visit (lambda.Body); if (lambda.GetReturnType () != typeof (void)) return interpreter.Pop (); return null; }