Esempio n. 1
0
 public MusicAlbum (string id, string parentId, MusicAlbumOptions options)
     : base (id, parentId, options)
 {
     Toc = options.Toc;
     Artists = Helper.MakeReadOnlyCopy (options.Artists);
     Producers = Helper.MakeReadOnlyCopy (options.Producers);
     Genres = Helper.MakeReadOnlyCopy (options.Genres);
     AlbumArtUris = Helper.MakeReadOnlyCopy (options.AlbumArtUris);
 }
Esempio n. 2
0
        protected void CopyToOptions (MusicAlbumOptions options)
        {
            base.CopyToOptions (options);

            options.Toc = Toc;
            options.Artists = new List<PersonWithRole> (Artists);
            options.Producers = new List<string> (Producers);
            options.Genres = new List<string> (Genres);
            options.AlbumArtUris = new List<Uri> (AlbumArtUris);
        }
Esempio n. 3
0
 static void AssertMusicAlbum (MusicAlbum musicAlbum, MusicAlbumOptions options)
 {
     AssertAlbum (musicAlbum, options);
     Assert.AreEqual (musicAlbum.Toc, options.Toc);
     Assert.IsTrue (musicAlbum.Artists.IsReadOnly);
     Assert.IsTrue (musicAlbum.Genres.IsReadOnly);
     Assert.IsTrue (musicAlbum.Producers.IsReadOnly);
     Assert.IsTrue (musicAlbum.AlbumArtUris.IsReadOnly);
     CollectionAssert.AreEqual (musicAlbum.Artists, options.Artists);
     CollectionAssert.AreEqual (musicAlbum.Genres, options.Genres);
     CollectionAssert.AreEqual (musicAlbum.Producers, options.Producers);
     CollectionAssert.AreEqual (musicAlbum.AlbumArtUris, options.AlbumArtUris);
 }
Esempio n. 4
0
 static void SetMusicAlbumOptions (MusicAlbumOptions options)
 {
     SetAlbumOptions (options);
     options.Toc = "33";
     options.Artists = new[] { new PersonWithRole ("artist", "role") };
     options.Genres = new[] { "genre" };
     options.Producers = new[] { "genres" };
     options.AlbumArtUris = new[] { new Uri ("http://albumart") };
 }
Esempio n. 5
0
 public void MusicAlbumInstantiation ()
 {
     var options = new MusicAlbumOptions ();
     SetMusicAlbumOptions (options);
     var music_album = new MusicAlbum ("-1", "-1", options);
     AssertMusicAlbum (music_album, options);
     AssertMusicAlbum (music_album, music_album.GetOptions ());
 }
Esempio n. 6
0
 public new MusicAlbumOptions GetOptions ()
 {
     var options = new MusicAlbumOptions ();
     CopyToOptions (options);
     return options;
 }