private static object GetExpressionValue(Expression expression) { var constantExpression = expression as ConstantExpression; return(constantExpression != null ? constantExpression.Value : CachedExpressionCompiler.Evaluate(expression)); }
private static object GetArgumentValue(Expression expression) { Debug.Assert(expression != null); var constantExpression = expression as ConstantExpression; if (constantExpression != null) { return(constantExpression.Value); } return(CachedExpressionCompiler.Evaluate(expression)); }