Esempio n. 1
0
        public new PlaylistItemOptions GetOptions()
        {
            var options = new PlaylistItemOptions();

            CopyToOptions(options);
            return(options);
        }
Esempio n. 2
0
 public PlaylistItem(string id, string parentId, PlaylistItemOptions options)
     : base(id, parentId, options)
 {
     LongDescription = options.LongDescription;
     StorageMedium   = options.StorageMedium;
     Description     = options.Description;
     Date            = options.Date;
     Language        = options.Language;
     Artists         = Helper.MakeReadOnlyCopy(options.Artists);
     Genres          = Helper.MakeReadOnlyCopy(options.Genres);
 }
Esempio n. 3
0
 public PlaylistItem (string id, string parentId, PlaylistItemOptions options)
     : base (id, parentId, options)
 {
     LongDescription = options.LongDescription;
     StorageMedium = options.StorageMedium;
     Description = options.Description;
     Date = options.Date;
     Language = options.Language;
     Artists = Helper.MakeReadOnlyCopy (options.Artists);
     Genres = Helper.MakeReadOnlyCopy (options.Genres);
 }
Esempio n. 4
0
        protected void CopyToOptions(PlaylistItemOptions options)
        {
            base.CopyToOptions(options);

            options.LongDescription = LongDescription;
            options.StorageMedium   = StorageMedium;
            options.Description     = Description;
            options.Date            = Date;
            options.Language        = Language;
            options.Artists         = new List <PersonWithRole> (Artists);
            options.Genres          = new List <string> (Genres);
        }
Esempio n. 5
0
        protected void CopyToOptions (PlaylistItemOptions options)
        {
            base.CopyToOptions (options);

            options.LongDescription = LongDescription;
            options.StorageMedium = StorageMedium;
            options.Description = Description;
            options.Date = Date;
            options.Language = Language;
            options.Artists = new List<PersonWithRole> (Artists);
            options.Genres = new List<string> (Genres);
        }
Esempio n. 6
0
 static void AssertPlaylistItem (PlaylistItem playlistItem, PlaylistItemOptions options)
 {
     AssertItem (playlistItem, options);
     Assert.AreEqual (playlistItem.StorageMedium, options.StorageMedium);
     Assert.AreEqual (playlistItem.LongDescription, options.LongDescription);
     Assert.AreEqual (playlistItem.Description, options.Description);
     Assert.AreEqual (playlistItem.Date, options.Date);
     Assert.AreEqual (playlistItem.Language, options.Language);
     Assert.IsTrue (playlistItem.Artists.IsReadOnly);
     Assert.IsTrue (playlistItem.Genres.IsReadOnly);
     CollectionAssert.AreEqual (playlistItem.Artists, options.Artists);
     CollectionAssert.AreEqual (playlistItem.Genres, options.Genres);
 }
Esempio n. 7
0
 static void SetPlaylistItemOptions (PlaylistItemOptions options)
 {
     SetItemOptions (options);
     options.StorageMedium = "47";
     options.LongDescription = "48";
     options.Description = "49";
     options.Date = "50";
     options.Language = "51";
     options.Artists = new[] { new PersonWithRole ("artist", "role") };
     options.Genres = new[] { "genre" };
 }
Esempio n. 8
0
 public void PlaylistItemInstantiation ()
 {
     var options = new PlaylistItemOptions ();
     SetPlaylistItemOptions (options);
     var playlist_item = new PlaylistItem ("-1", "-1", options);
     AssertPlaylistItem (playlist_item, options);
     AssertPlaylistItem (playlist_item, playlist_item.GetOptions ());
 }
Esempio n. 9
0
 public new PlaylistItemOptions GetOptions ()
 {
     var options = new PlaylistItemOptions ();
     CopyToOptions (options);
     return options;
 }