public static string GetVisitedKey(PackageNode package)
 {
     if (package == null || package.Name == null)
     {
         return(null);
     }
     return(GetVisitedKey(package.Name, package.Version));
 }
        public void AddChild(PackageNode v, PackageNode w)
        {
            var node = this.Search(v.Id);

            if (node != null)
            {
                if (node.Children == null)
                {
                    node.Children = new List <PackageNode>();
                }
                node.Children.Add(w);
            }
        }