Esempio n. 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;
     }
 }
Esempio n. 2
0
 public virtual void Visit(ElseSyntax pNode)
 {
     pNode.If?.Accept(this);
     pNode.Body?.Accept(this);
 }
Esempio n. 3
0
 public virtual SyntaxNode Visit(ElseSyntax pNode)
 {
     return(SyntaxFactory.Else(pNode.If?.Accept <IfSyntax>(this),
                               pNode.Body?.Accept <BlockSyntax>(this)).WithAttributes(pNode));
 }
Esempio n. 4
0
 public static IfSyntax If(ExpressionSyntax pCondition, BlockSyntax pBlock, ElseSyntax pElse)
 {
     return(new IfSyntax(pCondition, pBlock, pElse));
 }