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

◆ ExclusiveOr() [2/2]

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

Definition at line 1974 of file Expression.cs.

1975 {
1976 ExpressionUtils.RequiresCanRead(left, "left");
1977 ExpressionUtils.RequiresCanRead(right, "right");
1978 if (method == null)
1979 {
1980 if (left.Type == right.Type && left.Type.IsIntegerOrBool())
1981 {
1982 return new SimpleBinaryExpression(ExpressionType.ExclusiveOr, left, right, left.Type);
1983 }
1984 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.ExclusiveOr, "op_ExclusiveOr", left, right, liftToNull: true);
1985 }
1986 return GetMethodBasedBinaryOperator(ExpressionType.ExclusiveOr, left, right, method, liftToNull: true);
1987 }
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().