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

◆ GetUserDefinedBinaryOperator() [1/2]

static BinaryExpression System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperator ( ExpressionType binaryType,
string name,
Expression< TDelegate > left,
Expression< TDelegate > right,
bool liftToNull )
inlinestaticprivateinherited

Definition at line 719 of file Expression.cs.

720 {
722 if (userDefinedBinaryOperator != null)
723 {
724 return new MethodBinaryExpression(binaryType, left, right, userDefinedBinaryOperator.ReturnType, userDefinedBinaryOperator);
725 }
726 if (left.Type.IsNullableType() && right.Type.IsNullableType())
727 {
728 Type nonNullableType = left.Type.GetNonNullableType();
729 Type nonNullableType2 = right.Type.GetNonNullableType();
731 if (userDefinedBinaryOperator != null && userDefinedBinaryOperator.ReturnType.IsValueType && !userDefinedBinaryOperator.ReturnType.IsNullableType())
732 {
733 if (userDefinedBinaryOperator.ReturnType != typeof(bool) || liftToNull)
734 {
735 return new MethodBinaryExpression(binaryType, left, right, userDefinedBinaryOperator.ReturnType.GetNullableType(), userDefinedBinaryOperator);
736 }
737 return new MethodBinaryExpression(binaryType, left, right, typeof(bool), userDefinedBinaryOperator);
738 }
739 }
740 return null;
741 }
static BinaryExpression GetUserDefinedBinaryOperator(ExpressionType binaryType, string name, Expression left, Expression right, bool liftToNull)

References System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperator().

Referenced by System.Linq.Expressions.Expression< TDelegate >.AndAlso(), System.Linq.Expressions.Expression< TDelegate >.GetEqualityComparisonOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperator(), System.Linq.Expressions.Expression< TDelegate >.GetUserDefinedBinaryOperatorOrThrow(), System.Linq.Expressions.Expression< TDelegate >.OrElse(), and System.Linq.Expressions.Expression< TDelegate >.Power().