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

◆ VisitConditional()

override Expression System.Linq.Expressions.DebugViewWriter.VisitConditional ( ConditionalExpression node)
inlinepackagevirtual

Reimplemented from System.Linq.Expressions.ExpressionVisitor.

Definition at line 454 of file DebugViewWriter.cs.

455 {
456 if (IsSimpleExpression(node.Test))
457 {
458 Out(".If (");
459 Visit(node.Test);
460 Out(") {", Flow.NewLine);
461 }
462 else
463 {
464 Out(".If (", Flow.NewLine);
465 Indent();
466 Visit(node.Test);
467 Dedent();
468 Out(Flow.NewLine, ") {", Flow.NewLine);
469 }
470 Indent();
471 Visit(node.IfTrue);
472 Dedent();
473 Out(Flow.NewLine, "} .Else {", Flow.NewLine);
474 Indent();
475 Visit(node.IfFalse);
476 Dedent();
477 Out(Flow.NewLine, "}");
478 return node;
479 }
static bool IsSimpleExpression(Expression node)
virtual ? Expression Visit(Expression? node)

References System.Linq.Expressions.DebugViewWriter.Dedent(), System.Linq.Expressions.DebugViewWriter.Indent(), System.Linq.Expressions.DebugViewWriter.IsSimpleExpression(), System.Reflection.Out, and System.Linq.Expressions.ExpressionVisitor.Visit().