Esempio n. 1
0
 /// <summary>
 /// Adds any child.
 /// </summary>
 /// <param name="node">The node.</param>
 /// <exception cref="System.NotImplementedException">Visiting memory location more than once</exception>
 public void addAnyChild(MemoryCollectorNode node)
 {
     if (AnyChildNode == null)
     {
         AnyChildNode = node;
         ChildNodes.Add(node);
     }
     else
     {
         throw new NotImplementedException("Visiting memory location more than once");
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Adds the child.
        /// </summary>
        /// <param name="node">The node.</param>
        /// <param name="name">The name.</param>
        /// <exception cref="System.NotImplementedException">Visiting memory location more than once</exception>
        public void addChild(MemoryCollectorNode node, string name)
        {
            if (NamedChildNodes == null)
            {
                NamedChildNodes   = new Dictionary <string, MemoryCollectorNode>();
                UndefinedChildren = new List <Tuple <string, MemoryCollectorNode> >();
            }

            if (!NamedChildNodes.ContainsKey(name))
            {
                NamedChildNodes.Add(name, node);
                ChildNodes.Add(node);
            }
            else
            {
                throw new NotImplementedException("Visiting memory location more than once");
            }
        }