private static List<Node> CreateSubTrees(List<CmisUtils.NodeTree> children, Node parent)
{
List<Node> result = new List<Node>();
foreach (CmisUtils.NodeTree child in children)
{
Folder f = new Folder()
{
Path = child.Path,
Name = child.Name,
Parent = parent,
LocationType = Node.NodeLocationType.REMOTE
};
if (child.Finished)
{
f.Status = LoadingStatus.DONE;
}
if (child.Children != null)
{
List<Node> subchildren = CreateSubTrees(child.Children, f);
foreach (Node subchild in subchildren)
f.Children.Add(subchild);
}
result.Add(f);
}
return result;
}