public StatementContainer ReplaceNode(SyntaxNode oldNode, SyntaxNode newNode) { if (IsBlock) { return(new StatementContainer(Block.ReplaceNode(oldNode, newNode))); } if (IsSwitchSection) { return(new StatementContainer(SwitchSection.ReplaceNode(oldNode, newNode))); } return(this); }
public StatementsInfo ReplaceNode(SyntaxNode oldNode, SyntaxNode newNode) { if (IsInBlock) { return(new StatementsInfo(Block.ReplaceNode(oldNode, newNode))); } if (IsInSwitchSection) { return(new StatementsInfo(SwitchSection.ReplaceNode(oldNode, newNode))); } return(this); }