public void SetFileSystemTree(FileSystemTree tree)
 {
     _fileSystemEntryRootNodes = tree.Root
                                 .Entries
                                 .Select(x => FileSystemEntryViewModel.Create(_sourceExplorerViewModelHost, null, x))
                                 .ToList();
     ExpandNodes(_fileSystemEntryRootNodes, false);
     SwitchToFileSystemTree();
 }
 private IList <TreeViewItemViewModel> CreateChildren()
 {
     return(_directoryEntry.Entries
            .Select(x => (TreeViewItemViewModel)FileSystemEntryViewModel.Create(
                        this.Host,
                        this,
                        x))
            .ToList());
 }
 public void SetFileContentsSearchResult(DirectoryEntry searchResults, string description, bool expandAll)
 {
     _fileContentsResultRootNodes =
         new List <TreeViewItemViewModel> {
         new TextItemViewModel(ImageSourceFactory, null, description)
     }.Concat(
         searchResults
         .Entries
         .Select(x => FileSystemEntryViewModel.Create(_sourceExplorerViewModelHost, null, x)))
     .ToList();
     ExpandNodes(_fileContentsResultRootNodes, expandAll);
     SwitchToFileContentsSearchResult();
 }