internal override void ReplaceChild(Node oldChild, Node newChild) { if ( _a_ == oldChild ) { SetA ((TNewline) newChild); return; } for ( int i = 0; i < _import_.Count; i++ ) { Node n = (Node)_import_[i]; if(n == oldChild) { if(newChild != null) { _import_[i] = newChild; oldChild.Parent(null); return; } _import_.RemoveAt(i); oldChild.Parent(null); return; } } for ( int i = 0; i < _scopealteration_.Count; i++ ) { Node n = (Node)_scopealteration_[i]; if(n == oldChild) { if(newChild != null) { _scopealteration_[i] = newChild; oldChild.Parent(null); return; } _scopealteration_.RemoveAt(i); oldChild.Parent(null); return; } } if ( _documentinside_ == oldChild ) { SetDocumentinside ((PDocumentinside) newChild); return; } if ( _b_ == oldChild ) { SetB ((TNewline) newChild); return; } }
internal override void ReplaceChild(Node oldChild, Node newChild) { for ( int i = 0; i < _planereference_.Count; i++ ) { Node n = (Node)_planereference_[i]; if(n == oldChild) { if(newChild != null) { _planereference_[i] = newChild; oldChild.Parent(null); return; } _planereference_.RemoveAt(i); oldChild.Parent(null); return; } } for ( int i = 0; i < _scopealteration_.Count; i++ ) { Node n = (Node)_scopealteration_[i]; if(n == oldChild) { if(newChild != null) { _scopealteration_[i] = newChild; oldChild.Parent(null); return; } _scopealteration_.RemoveAt(i); oldChild.Parent(null); return; } } if ( _declarefirstlist_ == oldChild ) { SetDeclarefirstlist ((PDeclarefirstlist) newChild); return; } }