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

◆ NegateChecked() [2/2]

static UnaryExpression System.Linq.Expressions.Expression< TDelegate >.NegateChecked ( Expression< TDelegate > expression,
MethodInfo? method )
inlinestaticinherited

Definition at line 5157 of file Expression.cs.

5158 {
5160 if (method == null)
5161 {
5162 if (expression.Type.IsArithmetic() && !expression.Type.IsUnsignedInt())
5163 {
5164 return new UnaryExpression(ExpressionType.NegateChecked, expression, expression.Type, null);
5165 }
5166 return GetUserDefinedUnaryOperatorOrThrow(ExpressionType.NegateChecked, "op_UnaryNegation", expression);
5167 }
5169 }
static void RequiresCanRead(Expression expression, string paramName)
static UnaryExpression GetUserDefinedUnaryOperatorOrThrow(ExpressionType unaryType, string name, Expression operand)
static UnaryExpression GetMethodBasedUnaryOperator(ExpressionType unaryType, Expression operand, MethodInfo method)

References System.Linq.Expressions.Expression< TDelegate >.GetMethodBasedUnaryOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedUnaryOperatorOrThrow(), and System.Dynamic.Utils.ExpressionUtils.RequiresCanRead().