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

◆ MultiplyAssign() [3/3]

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

Definition at line 1677 of file Expression.cs.

1678 {
1679 ExpressionUtils.RequiresCanRead(left, "left");
1680 RequiresCanWrite(left, "left");
1681 ExpressionUtils.RequiresCanRead(right, "right");
1682 if (method == null)
1683 {
1684 if (left.Type == right.Type && left.Type.IsArithmetic())
1685 {
1686 if (conversion != null)
1687 {
1688 throw Error.ConversionIsNotSupportedForArithmeticTypes();
1689 }
1690 return new SimpleBinaryExpression(ExpressionType.MultiplyAssign, left, right, left.Type);
1691 }
1692 return GetUserDefinedAssignOperatorOrThrow(ExpressionType.MultiplyAssign, "op_Multiply", left, right, conversion, liftToNull: true);
1693 }
1694 return GetMethodBasedAssignOperator(ExpressionType.MultiplyAssign, left, right, method, conversion, liftToNull: true);
1695 }
static void RequiresCanRead(Expression expression, string paramName)
static BinaryExpression GetUserDefinedAssignOperatorOrThrow(ExpressionType binaryType, string name, Expression left, Expression right, LambdaExpression conversion, bool liftToNull)
static void RequiresCanWrite(Expression expression, string paramName)
static BinaryExpression GetMethodBasedAssignOperator(ExpressionType binaryType, Expression left, Expression right, MethodInfo method, LambdaExpression conversion, bool liftToNull)

References System.Linq.Expressions.Error.ConversionIsNotSupportedForArithmeticTypes(), System.Linq.Expressions.Expression< TDelegate >.GetMethodBasedAssignOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedAssignOperatorOrThrow(), System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), and System.Linq.Expressions.Expression< TDelegate >.RequiresCanWrite().