Esempio n. 1
0
 public void insertChild(Node child, int position)
 {
     if (position == 0)
     {
         this.m_XContainer.AddFirst(child.XNode);
     }
     else {
         var elementAtPosition = this.m_XContainer.Nodes().ElementAt(position - 1);
         elementAtPosition.AddAfterSelf(child.XNode);
     }
 }
Esempio n. 2
0
 public void appendChild(Node child)
 {
     var childAsParentNode = child as ParentNode;
     if (childAsParentNode != null)
     {
         this.m_XContainer.Add(childAsParentNode.m_XContainer);
     }
     var childAsText = child as Text;
     if (childAsText != null)
     {
         this.m_XContainer.Add(childAsText.XText);
     }
 }
Esempio n. 3
0
 public void removeChild(Node child)
 {
     child.detach();
 }
Esempio n. 4
0
 public int indexOf(Node node)
 {
     return this.m_XContainer.Nodes().ToList().IndexOf(node.XNode);
 }