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

◆ And() [2/2]

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

Definition at line 1874 of file Expression.cs.

1875 {
1876 ExpressionUtils.RequiresCanRead(left, "left");
1877 ExpressionUtils.RequiresCanRead(right, "right");
1878 if (method == null)
1879 {
1880 if (left.Type == right.Type && left.Type.IsIntegerOrBool())
1881 {
1882 return new SimpleBinaryExpression(ExpressionType.And, left, right, left.Type);
1883 }
1884 return GetUserDefinedBinaryOperatorOrThrow(ExpressionType.And, "op_BitwiseAnd", left, right, liftToNull: true);
1885 }
1887 }
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().