public void TakeOffline(IEnumerable<PlaylistItem> playlistItems, long spaceRequired, string playlistFilename) { var offlinePlaylist = new OfflinePlaylist(); foreach (var playlistItem in playlistItems) { var playlistItemCopy = playlistItem.Clone(); ConvertPlaylistItemToOffline(playlistItemCopy); offlinePlaylist.Add(playlistItemCopy); } _offlineStorageManager.SerializeItemToFile(offlinePlaylist, playlistFilename); OfflineStorageManager.EnsureSpaceAvailable(spaceRequired); playlistItems.ForEach(TakeOffline); }
public void TakeOffline(IEnumerable <PlaylistItem> playlistItems, long spaceRequired, string playlistFilename) { var offlinePlaylist = new OfflinePlaylist(); foreach (var playlistItem in playlistItems) { var playlistItemCopy = playlistItem.Clone(); ConvertPlaylistItemToOffline(playlistItemCopy); offlinePlaylist.Add(playlistItemCopy); } _offlineStorageManager.SerializeItemToFile(offlinePlaylist, playlistFilename); OfflineStorageManager.EnsureSpaceAvailable(spaceRequired); playlistItems.ForEach(TakeOffline); }