示例#1
0
        private zNode getZNode(Node <T> node, INodeBinder binder)
        {
            zNode x = new zNode();

            String name = binder.GetName(node.getNode());

            if (strUtil.IsNullOrEmpty(name))
            {
                name = node.getNode().Name;
            }

            x.name   = name;
            x.url    = binder.GetUrl(node.getNode());
            x.open   = binder.IsOpen(node.getNode());
            x.target = binder.GetTarget(node.getNode());

            if (node.getChildren().Count > 0)
            {
                foreach (Node <T> sub in node.getChildren())
                {
                    zNode subZ = getZNode(sub, binder);
                    x.AddSub(subZ);
                }
            }

            return(x);
        }
示例#2
0
        public zNode AddSub( zNode node )
        {
            if (this.children == null) {
                this.children = new List<zNode>();
            }

            this.children.Add( node );

            return this;
        }
示例#3
0
文件: zNode.cs 项目: zuhuizou/wojilu
        public zNode AddSub(zNode node)
        {
            if (this.children == null)
            {
                this.children = new List <zNode>();
            }

            this.children.Add(node);

            return(this);
        }