Beispiel #1
0
        public IEnumerable <AlbumModel> GetAllAlbums()
        {
            List <AlbumModel> albums = new List <AlbumModel>();

            if (Directory.Exists(this.RootPath))
            {
                foreach (string albumPath in Directory.GetFiles(this.RootPath, "Album.xml", SearchOption.AllDirectories))
                {
                    albums.Add(AlbumModel.FromXml(albumPath));
                }
            }

            return(albums.NonNull());
        }