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); }
public zNode AddSub( zNode node ) { if (this.children == null) { this.children = new List<zNode>(); } this.children.Add( node ); return this; }
public zNode AddSub(zNode node) { if (this.children == null) { this.children = new List <zNode>(); } this.children.Add(node); return(this); }