Esempio n. 1
0
        public IEnumerable <Folder> GetPhysicalParents()
        {
            var rootChildren = LibraryManager.RootFolder.Children
                               .OfType <Folder>()
                               .ToList();

            return(PhysicalLocations.Where(i => !string.Equals(i, Path, StringComparison.OrdinalIgnoreCase)).SelectMany(i => GetPhysicalParents(i, rootChildren)).DistinctBy(i => i.Id));
        }
Esempio n. 2
0
        private IEnumerable <Folder> GetPhysicalFolders(bool enableCache)
        {
            if (enableCache)
            {
                return(PhysicalFolderIds.Select(i => LibraryManager.GetItemById(i)).OfType <Folder>());
            }

            var rootChildren = LibraryManager.RootFolder.Children
                               .OfType <Folder>()
                               .ToList();

            return(PhysicalLocations.Where(i => !string.Equals(i, Path, StringComparison.OrdinalIgnoreCase)).SelectMany(i => GetPhysicalParents(i, rootChildren)).DistinctBy(i => i.Id));
        }
Esempio n. 3
0
        private IEnumerable <Folder> GetPhysicalFolders(bool enableCache)
        {
            if (enableCache)
            {
                return(PhysicalFolderIds.Select(i => LibraryManager.GetItemById(i)).OfType <Folder>());
            }

            var rootChildren = LibraryManager.RootFolder.Children
                               .OfType <Folder>()
                               .ToList();

            return(PhysicalLocations.Where(i => !FileSystem.AreEqual(i, Path)).SelectMany(i => GetPhysicalParents(i, rootChildren)).DistinctBy(i => i.Id));
        }