public static void Bind(INode node, INode root) { IPin pin = node as IPin; if (pin != null && !string.IsNullOrEmpty(pin.TargetName)) { INode target = NodeTree.Find(root, pin.TargetName); pin.Bind(target); } for (int i = 0; i < node.Children.Count; i++) { Bind(node.Children[i], root); } }