Exemplo n.º 1
0
Arquivo: Node.cs Projeto: bkzhn/dcsoup
 private void ReparentChild(Supremes.Nodes.Node child)
 {
     if (child.parentNode != null)
     {
         child.parentNode.RemoveChild(child);
     }
     child.SetParentNode(this);
 }
Exemplo n.º 2
0
Arquivo: Node.cs Projeto: bkzhn/dcsoup
 internal void ReplaceChild(Supremes.Nodes.Node @out, Supremes.Nodes.Node @in)
 {
     Validate.IsTrue(@out.parentNode == this);
     Validate.NotNull(@in);
     if (@in.parentNode != null)
     {
         @in.parentNode.RemoveChild(@in);
     }
     int index = @out.SiblingIndex;
     childNodes[index] = @in;
     @in.parentNode = this;
     @in.SiblingIndex = index;
     @out.parentNode = null;
 }
Exemplo n.º 3
0
Arquivo: Node.cs Projeto: bkzhn/dcsoup
 internal void RemoveChild(Supremes.Nodes.Node @out)
 {
     Validate.IsTrue(@out.parentNode == this);
     int index = @out.SiblingIndex;
     childNodes.RemoveAt(index);
     ReindexChildren();
     @out.parentNode = null;
 }
Exemplo n.º 4
0
Arquivo: Tag.cs Projeto: bkzhn/dcsoup
 private static void Register(Supremes.Nodes.Tag tag)
 {
     tags[tag.tagName] = tag;
 }