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