public static object Interpret(Expression expression) { var interpreter = new ExpressionInterpreter(); var result = interpreter.Visit(expression); if (result == InterpretFailed) { result = ExpressionFastCompiler.CompileAndRun(expression); } return result; }
public static object Interpret(Expression expression) { var interpreter = new ExpressionInterpreter(); try { var result = interpreter.Visit(expression); if (result == InterpretFailed) { result = ExpressionFastCompiler.CompileAndRun(expression); } return(result); } catch (TargetInvocationException e) { throw e.InnerException; } }