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

◆ ExclusiveOrAssign() [3/3]

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

Definition at line 1999 of file Expression.cs.

2000 {
2001 ExpressionUtils.RequiresCanRead(left, "left");
2002 RequiresCanWrite(left, "left");
2003 ExpressionUtils.RequiresCanRead(right, "right");
2004 if (method == null)
2005 {
2006 if (left.Type == right.Type && left.Type.IsIntegerOrBool())
2007 {
2008 if (conversion != null)
2009 {
2010 throw Error.ConversionIsNotSupportedForArithmeticTypes();
2011 }
2012 return new SimpleBinaryExpression(ExpressionType.ExclusiveOrAssign, left, right, left.Type);
2013 }
2014 return GetUserDefinedAssignOperatorOrThrow(ExpressionType.ExclusiveOrAssign, "op_ExclusiveOr", left, right, conversion, liftToNull: true);
2015 }
2016 return GetMethodBasedAssignOperator(ExpressionType.ExclusiveOrAssign, left, right, method, conversion, liftToNull: true);
2017 }
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().