Example #1
0
 public IfSyntax(ExpressionSyntax pCondition, BlockSyntax pBody, ElseSyntax pElse)
 {
     Condition        = pCondition;
     Body             = pBody;
     Else             = pElse;
     Condition.Parent = this;
     Body.Parent      = this;
     if (Else != null)
     {
         Else.Parent = this;
     }
 }
Example #2
0
 public virtual void Visit(ElseSyntax pNode)
 {
     pNode.If?.Accept(this);
     pNode.Body?.Accept(this);
 }
Example #3
0
 public virtual SyntaxNode Visit(ElseSyntax pNode)
 {
     return(SyntaxFactory.Else(pNode.If?.Accept <IfSyntax>(this),
                               pNode.Body?.Accept <BlockSyntax>(this)).WithAttributes(pNode));
 }
Example #4
0
 public static IfSyntax If(ExpressionSyntax pCondition, BlockSyntax pBlock, ElseSyntax pElse)
 {
     return(new IfSyntax(pCondition, pBlock, pElse));
 }