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

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

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

            options.LongDescription = LongDescription;
            options.Description     = Description;
            options.Date            = Date;
            options.StorageMedium   = StorageMedium;
            options.Language        = Language;
            options.Artists         = new List <PersonWithRole> (Artists);
            options.Producers       = new List <string> (Producers);
            options.Contributors    = new List <string> (Contributors);
            options.Genres          = new List <string> (Genres);
            options.Rights          = new List <string> (Rights);
        }
Esempio n. 6
0
 static void AssertPlaylistContainer (PlaylistContainer playlistContainer, PlaylistContainerOptions options)
 {
     AssertContainer (playlistContainer, options);
     Assert.AreEqual (playlistContainer.StorageMedium, options.StorageMedium);
     Assert.AreEqual (playlistContainer.LongDescription, options.LongDescription);
     Assert.AreEqual (playlistContainer.Description, options.Description);
     Assert.AreEqual (playlistContainer.Date, options.Date);
     Assert.AreEqual (playlistContainer.Language, options.Language);
     Assert.IsTrue (playlistContainer.Artists.IsReadOnly);
     Assert.IsTrue (playlistContainer.Genres.IsReadOnly);
     Assert.IsTrue (playlistContainer.Contributors.IsReadOnly);
     Assert.IsTrue (playlistContainer.Rights.IsReadOnly);
     CollectionAssert.AreEqual (playlistContainer.Artists, options.Artists);
     CollectionAssert.AreEqual (playlistContainer.Genres, options.Genres);
     CollectionAssert.AreEqual (playlistContainer.Contributors, options.Contributors);
     CollectionAssert.AreEqual (playlistContainer.Rights, options.Rights);
 }
Esempio n. 7
0
 static void SetPlaylistContainerOptions (PlaylistContainerOptions options)
 {
     SetContainerOptions (options);
     options.StorageMedium = "42";
     options.LongDescription = "43";
     options.Description = "44";
     options.Date = "45";
     options.Language = "46";
     options.Artists = new[] { new PersonWithRole ("artist", "role") };
     options.Genres = new[] { "genre" };
     options.Contributors = new[] { "contributor" };
     options.Rights = new[] { "right" };
 }
Esempio n. 8
0
 public void PlaylistContainerInstantiation ()
 {
     var options = new PlaylistContainerOptions ();
     SetPlaylistContainerOptions (options);
     var playlist_container = new PlaylistContainer ("-1", "-1", options);
     AssertPlaylistContainer (playlist_container, options);
     AssertPlaylistContainer (playlist_container, playlist_container.GetOptions ());
 }
Esempio n. 9
0
 public new PlaylistContainerOptions GetOptions ()
 {
     var options = new PlaylistContainerOptions ();
     CopyToOptions (options);
     return options;
 }