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

◆ Add() [2/2]

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

Definition at line 1333 of file Expression.cs.

1334 {
1335 ExpressionUtils.RequiresCanRead(left, "left");
1336 ExpressionUtils.RequiresCanRead(right, "right");
1337 if (method == null)
1338 {
1339 if (left.Type == right.Type && left.Type.IsArithmetic())
1340 {
1341 return new SimpleBinaryExpression(ExpressionType.Add, left, right, left.Type);
1342 }
1343 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.Add, "op_Addition", left, right, liftToNull: true);
1344 }
1346 }
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().