private static object GetClosureValue(MemberExpression node) { object value; if (node.Member.MemberType == MemberTypes.Field) { value = CqlExpressionVisitor.GetFieldValue(node); } else if (node.Member.MemberType == MemberTypes.Property) { value = CqlExpressionVisitor.GetPropertyValue(node); } else { value = Expression.Lambda(node).Compile().DynamicInvoke(); } return(value); }