示例#1
0
        public new AudioItemOptions GetOptions()
        {
            var options = new AudioItemOptions();

            CopyToOptions(options);
            return(options);
        }
示例#2
0
 public AudioItem (string id, string parentId, AudioItemOptions options)
     : base (id, parentId, options)
 {
     Description = options.Description;
     LongDescription = options.LongDescription;
     Language = options.Language;
     Publishers = Helper.MakeReadOnlyCopy (options.Publishers);
     Genres = Helper.MakeReadOnlyCopy (options.Genres);
     Relations = Helper.MakeReadOnlyCopy (options.Relations);
     Rights = Helper.MakeReadOnlyCopy (options.Rights);
 }
示例#3
0
 public AudioItem(string id, string parentId, AudioItemOptions options)
     : base(id, parentId, options)
 {
     Description     = options.Description;
     LongDescription = options.LongDescription;
     Language        = options.Language;
     Publishers      = Helper.MakeReadOnlyCopy(options.Publishers);
     Genres          = Helper.MakeReadOnlyCopy(options.Genres);
     Relations       = Helper.MakeReadOnlyCopy(options.Relations);
     Rights          = Helper.MakeReadOnlyCopy(options.Rights);
 }
示例#4
0
        protected void CopyToOptions (AudioItemOptions options)
        {
            base.CopyToOptions (options);

            options.Description = Description;
            options.LongDescription = LongDescription;
            options.Language = Language;
            options.Publishers = new List<string> (Publishers);
            options.Genres = new List<string> (Genres);
            options.Relations = new List<Uri> (Relations);
            options.Rights = new List<string> (Rights);
        }
示例#5
0
        protected void CopyToOptions(AudioItemOptions options)
        {
            base.CopyToOptions(options);

            options.Description     = Description;
            options.LongDescription = LongDescription;
            options.Language        = Language;
            options.Publishers      = new List <string> (Publishers);
            options.Genres          = new List <string> (Genres);
            options.Relations       = new List <Uri> (Relations);
            options.Rights          = new List <string> (Rights);
        }
示例#6
0
 static void AssertAudioItem (AudioItem audioItem, AudioItemOptions options)
 {
     AssertItem (audioItem, options);
     Assert.AreEqual (audioItem.Description, options.Description);
     Assert.AreEqual (audioItem.LongDescription, options.LongDescription);
     Assert.AreEqual (audioItem.Language, options.Language);
     Assert.IsTrue (audioItem.Genres.IsReadOnly);
     Assert.IsTrue (audioItem.Publishers.IsReadOnly);
     Assert.IsTrue (audioItem.Relations.IsReadOnly);
     Assert.IsTrue (audioItem.Rights.IsReadOnly);
     CollectionAssert.AreEqual (audioItem.Genres, options.Genres);
     CollectionAssert.AreEqual (audioItem.Publishers, options.Publishers);
     CollectionAssert.AreEqual (audioItem.Relations, options.Relations);
     CollectionAssert.AreEqual (audioItem.Rights, options.Rights);
 }
示例#7
0
 static void SetAudioItemOptions (AudioItemOptions options)
 {
     SetItemOptions (options);
     options.Description = "20";
     options.LongDescription = "21";
     options.Language = "22";
     options.Genres = new[] { "genre" };
     options.Publishers = new[] { "publisher" };
     options.Relations = new[] { new Uri ("http://relation") };
     options.Rights = new[] { "right" };
 }
示例#8
0
 public void AudioItemInstantiation ()
 {
     var options = new AudioItemOptions ();
     SetAudioItemOptions (options);
     var audio_item = new AudioItem ("-1", "-1", options);
     AssertAudioItem (audio_item, options);
     AssertAudioItem (audio_item, audio_item.GetOptions ());
 }
示例#9
0
 public new AudioItemOptions GetOptions ()
 {
     var options = new AudioItemOptions ();
     CopyToOptions (options);
     return options;
 }