Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ Multiply() [2/2]

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

Definition at line 1652 of file Expression.cs.

1653 {
1654 ExpressionUtils.RequiresCanRead(left, "left");
1655 ExpressionUtils.RequiresCanRead(right, "right");
1656 if (method == null)
1657 {
1658 if (left.Type == right.Type && left.Type.IsArithmetic())
1659 {
1660 return new SimpleBinaryExpression(ExpressionType.Multiply, left, right, left.Type);
1661 }
1662 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.Multiply, "op_Multiply", left, right, liftToNull: true);
1663 }
1664 return GetMethodBasedBinaryOperator(ExpressionType.Multiply, left, right, method, liftToNull: true);
1665 }
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().