Exemplo n.º 1
0
        internal static void InternalPrependChild(FormatStore.NodeStore nodes, int thisNode, int newChildNode)
        {
            FormatStore.NodeEntry[] array = nodes.Plane(thisNode);
            int num = nodes.Index(thisNode);

            FormatStore.NodeEntry[] array2 = nodes.Plane(newChildNode);
            int num2 = nodes.Index(newChildNode);

            if (array[num].LastChild != 0)
            {
                int lastChild = array[num].LastChild;
                FormatStore.NodeEntry[] array3 = nodes.Plane(lastChild);
                int num3 = nodes.Index(lastChild);
                array2[num2].NextSibling = array3[num3].NextSibling;
                array3[num3].NextSibling = newChildNode;
                array2[num2].Parent      = thisNode;
                return;
            }
            array2[num2].NextSibling = newChildNode;
            array2[num2].Parent      = thisNode;
            array[num].LastChild     = newChildNode;
        }
Exemplo n.º 2
0
 internal static void InternalAppendChild(FormatStore.NodeStore nodes, int thisNode, int newChildNode)
 {
     FormatNode.InternalPrependChild(nodes, thisNode, newChildNode);
     nodes.Plane(thisNode)[nodes.Index(thisNode)].LastChild = newChildNode;
 }