public static List<LiveSongInfo> GetRepeaterUsableList(List<FavoriteLiveSongList> songList)
        {
            var safeList = new List<LiveSongInfo>();

            foreach (var song in songList)
            {
                var liveSongInfo = new LiveSongInfo(song.LiveSong.SongName, song.HighestRating);

                if (song.FavoriteLiveShows.Count > 0)
                {
                    foreach (var show in song.FavoriteLiveShows)
                    {
                        liveSongInfo.FavoriteShowInfo += song.LiveSong.GetSongName(song.LiveSong.Length, show.ShowDate, show.City, show.State) + " ";
                    }
                }

                if (song.HighestRatedShows != null && song.HighestRatedShows.Count > 0)
                {
                    foreach (var show in song.HighestRatedShows)
                    {
                        liveSongInfo.HighestRatedShowInfo += song.LiveSong.GetSongName(song.LiveSong.Length, show.ShowDate, show.City, show.State) + " ";
                    }
                }

                safeList.Add(liveSongInfo);
            }

            return safeList;
        }
Exemplo n.º 2
0
        public static List <LiveSongInfo> GetRepeaterUsableList(List <FavoriteLiveSongList> songList)
        {
            var safeList = new List <LiveSongInfo>();

            foreach (var song in songList)
            {
                var liveSongInfo = new LiveSongInfo(song.LiveSong.SongName, song.HighestRating);

                if (song.FavoriteLiveShows.Count > 0)
                {
                    foreach (var show in song.FavoriteLiveShows)
                    {
                        liveSongInfo.FavoriteShowInfo += song.LiveSong.GetSongName(song.LiveSong.Length, show.ShowDate, show.City, show.State) + " ";
                    }
                }

                if (song.HighestRatedShows != null && song.HighestRatedShows.Count > 0)
                {
                    foreach (var show in song.HighestRatedShows)
                    {
                        liveSongInfo.HighestRatedShowInfo += song.LiveSong.GetSongName(song.LiveSong.Length, show.ShowDate, show.City, show.State) + " ";
                    }
                }

                safeList.Add(liveSongInfo);
            }

            return(safeList);
        }