private void LoadNode(IModelType type) { if (type.GetType() == typeof(Folder)) { _view.AddFolderTreeNode((Folder)type, type.ParentId); foreach (IModelType child in ((Folder)type).Children) { LoadNode(child); } } else if (type.GetType() == typeof(Bookmark)) { _view.AddBookmarkTreeNode((Bookmark)type, type.ParentId); } }