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

◆ ValidateUnary()

static UnaryExpression System.Linq.Expressions.ExpressionVisitor.ValidateUnary ( UnaryExpression before,
UnaryExpression after )
inlinestaticprivateinherited

Definition at line 339 of file ExpressionVisitor.cs.

340 {
341 if (before != after && before.Method == null)
342 {
343 if (after.Method != null)
344 {
345 throw Error.MustRewriteWithoutMethod(after.Method, "VisitUnary");
346 }
347 if (before.Operand != null && after.Operand != null)
348 {
349 ValidateChildType(before.Operand.Type, after.Operand.Type, "VisitUnary");
350 }
351 }
352 return after;
353 }
static void ValidateChildType(Type before, Type after, string methodName)

References System.Linq.Expressions.UnaryExpression.Method, System.Linq.Expressions.Error.MustRewriteWithoutMethod(), System.Linq.Expressions.UnaryExpression.Operand, System.Linq.Expressions.Expression< TDelegate >.Type, and System.Linq.Expressions.ExpressionVisitor.ValidateChildType().

Referenced by System.Linq.Expressions.ExpressionVisitor.VisitUnary().