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

◆ MultiplyChecked() [2/2]

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

Definition at line 1732 of file Expression.cs.

1733 {
1734 ExpressionUtils.RequiresCanRead(left, "left");
1735 ExpressionUtils.RequiresCanRead(right, "right");
1736 if (method == null)
1737 {
1738 if (left.Type == right.Type && left.Type.IsArithmetic())
1739 {
1740 return new SimpleBinaryExpression(ExpressionType.MultiplyChecked, left, right, left.Type);
1741 }
1742 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.MultiplyChecked, "op_Multiply", left, right, liftToNull: true);
1743 }
1744 return GetMethodBasedBinaryOperator(ExpressionType.MultiplyChecked, left, right, method, liftToNull: true);
1745 }
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().