private void AddParent(IDomObject element, int index) { DomObject item = element as DomObject; item.ParentNode = Owner; item.Index = index; if (element.IsIndexed) { item.Document.DocumentIndex.AddToIndex((IDomIndexedNode)element); } }
protected void AddParent(IDomObject element, int index) { DomObject item = (DomObject)element; item.ParentNode = Owner; item.Index = index; if (element is IDomIndexedNode && !element.IsDisconnected) { element.Document.AddToIndex((IDomIndexedNode)element); } }
private void RemoveParent(IDomObject element) { if (element.ParentNode != null) { DomObject item = element as DomObject; if (!element.IsDisconnected && element.IsIndexed) { item.Document.DocumentIndex.RemoveFromIndex((IDomIndexedNode)element); } item.ParentNode = null; } }