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

◆ MultiplyAssignChecked() [3/3]

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

Definition at line 1707 of file Expression.cs.

1708 {
1709 ExpressionUtils.RequiresCanRead(left, "left");
1710 RequiresCanWrite(left, "left");
1711 ExpressionUtils.RequiresCanRead(right, "right");
1712 if (method == null)
1713 {
1714 if (left.Type == right.Type && left.Type.IsArithmetic())
1715 {
1716 if (conversion != null)
1717 {
1718 throw Error.ConversionIsNotSupportedForArithmeticTypes();
1719 }
1720 return new SimpleBinaryExpression(ExpressionType.MultiplyAssignChecked, left, right, left.Type);
1721 }
1722 return GetUserDefinedAssignOperatorOrThrow(ExpressionType.MultiplyAssignChecked, "op_Multiply", left, right, conversion, liftToNull: true);
1723 }
1724 return GetMethodBasedAssignOperator(ExpressionType.MultiplyAssignChecked, left, right, method, conversion, liftToNull: true);
1725 }
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().