List <ExplorerItemNodeViewModel> GetItems(List <ExplorerItemNodeViewModel> items, IDependencyVisualizationNode node, IExplorerItemNodeViewModel parent, ref List <ExplorerItemNodeViewModel> acc, List <Guid> seenResource, IExplorerItemViewModel exploreritem)
        {
            var item = new ExplorerItemNodeViewModel(_server, parent, _popupController)
            {
                ResourceName   = exploreritem.ResourceName,
                TextVisibility = true,
                ResourceType   = exploreritem.ResourceType,
                IsMainNode     = exploreritem.ResourceName.Equals(ResourceModel.ResourceName),
                ResourceId     = Guid.Parse(node.ID)
            };

            if (node.NodeDependencies != null && node.NodeDependencies.Count > 0)
            {
                seenResource.Add(Guid.Parse(node.ID));
                item.Children = new ObservableCollection <IExplorerItemViewModel>(GetItems(node.NodeDependencies, item, acc, seenResource).Select(a => a as IExplorerItemViewModel));
            }
            else
            {
                seenResource.Add(Guid.Parse(node.ID));
                item.Children = new ObservableCollection <IExplorerItemViewModel>();
            }
            items.Add(item);
            acc.Add(item);
            return(items);
        }
 public NodeInfo(IDependencyVisualizationNode node)
 {
     Node   = node;
     _index = 0;
 }