Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Or() [2/2]

static BinaryExpression System.Linq.Expressions.Expression< TDelegate >.Or ( Expression< TDelegate > left,
Expression< TDelegate > right,
MethodInfo? method )
inlinestaticinherited

Definition at line 1924 of file Expression.cs.

1925 {
1926 ExpressionUtils.RequiresCanRead(left, "left");
1927 ExpressionUtils.RequiresCanRead(right, "right");
1928 if (method == null)
1929 {
1930 if (left.Type == right.Type && left.Type.IsIntegerOrBool())
1931 {
1932 return new SimpleBinaryExpression(ExpressionType.Or, left, right, left.Type);
1933 }
1934 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.Or, "op_BitwiseOr", left, right, liftToNull: true);
1935 }
1937 }
static void RequiresCanRead(Expression expression, string paramName)
static BinaryExpression GetMethodBasedBinaryOperator(ExpressionType binaryType, Expression left, Expression right, MethodInfo method, bool liftToNull)
static BinaryExpression GetUserDefinedBinaryOperatorOrThrow(ExpressionType binaryType, string name, Expression left, Expression right, bool liftToNull)

References System.Linq.Expressions.Expression< TDelegate >.GetMethodBasedBinaryOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperatorOrThrow(), and System.Dynamic.Utils.ExpressionUtils.RequiresCanRead().