Exemplo n.º 1
0
        /// <summary>
        /// Get the fully qualified name of a node
        /// This function is very slow, so is probably useful for debugging only.
        /// </summary>
        /// <returns></returns>
        public string GetFullyQualifiedName()
        {
            List <string> stack = new List <string>();

            stack.Add(GetDisplayName(true));
            PropertyNode tmpn   = GetParent();
            bool         atroot = false;

            while (!atroot)
            {
                stack.Add(tmpn.GetDisplayName(true));
                if (tmpn.GetParent() == null)
                {
                    atroot = true;
                }
                else
                {
                    tmpn = tmpn.GetParent();
                }
            }

            string fqname = "";

            for (int i = stack.Count - 1; i > 0; i--)
            {
                fqname += stack[i];
                fqname += "/";
            }
            fqname += stack[0];
            return(fqname);
        }