Example #1
0
        /// <summary>
        /// Sets the the current node as Child of a given DebugContainerResponseNode.
        /// </summary>
        /// <param name="node">The parent node for this node.</param>
        internal void SetParentURL(DebugContainerResponseNode node)
        {
            // We don't want to expose this to someone who does not know how exactly this works. Please just use 'parentNode.AddNode(this);' to add this node to a parentNode.

            if (URL != null)
            {
                if (_parentNode != null)
                {
                    Logger.LogTrace($"SetParentURL: A DebugNodes parent is being modified and it will not be accessible anymore via the old URL. (The URL is changing from '{URL}' to '{node.URL}/{ID}'.)");
                    _parentNode.RemoveNode(this);
                }
            }

            if (node == null)
            {
                URL = new URL <ID>(new ID[] { ID });
            }
            else
            {
                URL = node.URL.Append(ID);
            }

            _parentNode = node;
        }
Example #2
0
 /// <summary>
 /// Removes a node from the static DebugNode.
 /// </summary>
 /// <param name="node">The node to remove.</param>
 public static void RemoveNode(DebugResponseNode node)
 {
     _debugNode.RemoveNode(node);
 }