public StationIterator(StationsCollection collection, bool reverse = false)
 {
     this._collection = collection;
     this._reverse    = reverse;
     if (reverse)
     {
         this._position = collection.GetItems().Count;
     }
 }
Example #2
0
 public void Play()
 {
     if (_bitrates.GetItems().Contains(_bitrate))
     {
         foreach (Composition c in _playlist.Playlist)
         {
             Console.WriteLine(c.Author + " - " + c.Name + ", " + _bitrate.ToString() + " kbit/s");
         }
         Console.WriteLine("");
     }
     else
     {
         Console.WriteLine("Error");
         Console.WriteLine("");
     }
 }
Example #3
0
        public void Play(IPlaylist playlist, int bitrate)
        {
            StationsCollection bitrates = new StationsCollection();

            if (bitrates.GetItems().Contains(bitrate))
            {
                foreach (Composition c in playlist.Playlist)
                {
                    Console.WriteLine(c.Author + " - " + c.Name + ", " + bitrate.ToString() + " kbit/s");
                }
                Console.WriteLine("");
            }
            else
            {
                Console.WriteLine("Error");
                Console.WriteLine("");
            }
        }