/// <summary> /// Get tree view and current selected folder /// </summary> /// <param name="folderId">The Id of selected folder</param> /// <returns>Tree with current selected folder marked</returns> public FolderTreeViewModel GetCurrentFolderTree(int?folderId = null) { if (_currentFolderTree == null) { _currentFolderTree = new FolderTreeViewModel(); FolderTreeBuilder treeBuilder = new FolderTreeBuilder(FolderList, folderId); _currentFolderTree.TreeRoot = treeBuilder.TreeRoot; } if (folderId.HasValue) { _currentFolderTree.CurrentFolder = FolderList.SingleOrDefault(x => object.Equals(x.FolderId, folderId.Value)); } return(_currentFolderTree); }
private PluginManager() { folderTreeBuilderPlugin = new FolderTreeBuilder(); folderTreeBuilderPlugin.Initialize(); }