public static BinaryExpression Or(Expression left, Expression right, MethodInfo method)
{
RequiresCanRead(left, nameof(left));
RequiresCanRead(right, nameof(right));
if (method == null)
{
if (left.Type == right.Type && left.Type.IsIntegerOrBool())
{
return new SimpleBinaryExpression(ExpressionType.Or, left, right, left.Type);
}
return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.Or, "op_BitwiseOr", left, right, liftToNull: true);
}
return GetMethodBasedBinaryOperator(ExpressionType.Or, left, right, method, liftToNull: true);
}