Example #1
0
        /// <summary>
        /// Constructs a new root-DebugResponse-node.
        /// </summary>
        /// <param name="name">The name of the Node.</param>
        /// <param name="description">The description for the node.</param>
        /// <param name="getElementFunc">The function to call whenever the contents of the node will be requested.</param>
        /// <returns>A root-DebugResponse-node.</returns>
        public static DebugContainerResponseNode ConstructRootNode(string name, string description = null, Func <SessionData, HElement> getElementFunc = null)
        {
            DebugContainerResponseNode ret = new DebugContainerResponseNode();

            ret.Name         = name;
            ret._description = description;
            ret._subNodes    = new AVLTree <ID, DebugResponseNode>();
            ret.GetElements  = getElementFunc ?? (s => new HPlainText());
            ret.SetRootNode();

            return(ret);
        }