Esempio n. 1
0
        private LibraryFileNode MakeFileNode(BinaryStorageClass binary)
        {
            var parent      = FindParentNode(binary.PathId);
            var pathStrings = GetPathStrings(_paths.Get(binary.PathId));
            var fileNode    = new LibraryFileNode(_dispatcher, _eventAggregator)
            {
                Name   = _tags.Get(binary.NameTag),
                Id     = binary.Id,
                Path   = pathStrings,
                Parent = parent,
            };

            _nodeIndex[binary.Id] = fileNode;
            return(fileNode);
        }
Esempio n. 2
0
 public string[] GetPathStrings(int id)
 {
     int[] tags;
     if (!_paths.TryGetValue(id, out tags))
     {
         return new string[] {}
     }
     ;
     return(tags.Select(t => _tags.Get(t)).ToArray());
 }