Open.Core.TreeNode.ToDictionary C# (CSharp) Method

ToDictionary() private method

private ToDictionary ( ) : System.Collections.Dictionary
return System.Collections.Dictionary
        private Dictionary ToDictionary()
        {
            // Setup initial conditions.
            Dictionary json = new Dictionary();
            SerializingJson(json);

            // Add children.
            ArrayList children = new ArrayList();
            foreach (TreeNode child in Children)
            {
                children.Add(child.ToDictionary());
            }
            json[PropChildren] = children;

            // Finish up.
            return json;
        }