Beispiel #1
0
        public new VideoItemOptions GetOptions()
        {
            var options = new VideoItemOptions();

            CopyToOptions(options);
            return(options);
        }
Beispiel #2
0
 public VideoItem(string id, string parentId, VideoItemOptions options)
     : base(id, parentId, options)
 {
     Description     = options.Description;
     LongDescription = options.LongDescription;
     Rating          = options.Rating;
     Language        = options.Language;
     Genres          = Helper.MakeReadOnlyCopy(options.Genres);
     Actors          = Helper.MakeReadOnlyCopy(options.Actors);
     Directors       = Helper.MakeReadOnlyCopy(options.Directors);
     Producers       = Helper.MakeReadOnlyCopy(options.Producers);
     Publishers      = Helper.MakeReadOnlyCopy(options.Publishers);
     Relations       = Helper.MakeReadOnlyCopy(options.Relations);
 }
Beispiel #3
0
 public VideoItem (string id, string parentId, VideoItemOptions options)
     : base (id, parentId, options)
 {
     Description = options.Description;
     LongDescription = options.LongDescription;
     Rating = options.Rating;
     Language = options.Language;
     Genres = Helper.MakeReadOnlyCopy (options.Genres);
     Actors = Helper.MakeReadOnlyCopy (options.Actors);
     Directors = Helper.MakeReadOnlyCopy (options.Directors);
     Producers = Helper.MakeReadOnlyCopy (options.Producers);
     Publishers = Helper.MakeReadOnlyCopy (options.Publishers);
     Relations = Helper.MakeReadOnlyCopy (options.Relations);
 }
Beispiel #4
0
        protected void CopyToOptions(VideoItemOptions options)
        {
            base.CopyToOptions(options);

            options.Description     = Description;
            options.LongDescription = LongDescription;
            options.Rating          = Rating;
            options.Language        = Language;
            options.Genres          = new List <string> (Genres);
            options.Actors          = new List <PersonWithRole> (Actors);
            options.Directors       = new List <string> (Directors);
            options.Producers       = new List <string> (Producers);
            options.Publishers      = new List <string> (Publishers);
            options.Relations       = new List <Uri> (Relations);
        }
Beispiel #5
0
        protected void CopyToOptions (VideoItemOptions options)
        {
            base.CopyToOptions (options);

            options.Description = Description;
            options.LongDescription = LongDescription;
            options.Rating = Rating;
            options.Language = Language;
            options.Genres = new List<string> (Genres);
            options.Actors = new List<PersonWithRole> (Actors);
            options.Directors = new List<string> (Directors);
            options.Producers = new List<string> (Producers);
            options.Publishers = new List<string> (Publishers);
            options.Relations = new List<Uri> (Relations);
        }
Beispiel #6
0
 static void AssertVideoItem (VideoItem videoItem, VideoItemOptions options)
 {
     AssertItem (videoItem, options);
     Assert.AreEqual (videoItem.LongDescription, options.LongDescription);
     Assert.AreEqual (videoItem.Description, options.Description);
     Assert.AreEqual (videoItem.Rating, options.Rating);
     Assert.AreEqual (videoItem.Language, options.Language);
     Assert.IsTrue (videoItem.Genres.IsReadOnly);
     Assert.IsTrue (videoItem.Producers.IsReadOnly);
     Assert.IsTrue (videoItem.Actors.IsReadOnly);
     Assert.IsTrue (videoItem.Directors.IsReadOnly);
     Assert.IsTrue (videoItem.Publishers.IsReadOnly);
     Assert.IsTrue (videoItem.Relations.IsReadOnly);
     CollectionAssert.AreEqual (videoItem.Genres, options.Genres);
     CollectionAssert.AreEqual (videoItem.Producers, options.Producers);
     CollectionAssert.AreEqual (videoItem.Actors, options.Actors);
     CollectionAssert.AreEqual (videoItem.Directors, options.Directors);
     CollectionAssert.AreEqual (videoItem.Publishers, options.Publishers);
     CollectionAssert.AreEqual (videoItem.Relations, options.Relations);
 }
Beispiel #7
0
 static void SetVideoItemOptions (VideoItemOptions options)
 {
     SetItemOptions (options);
     options.LongDescription = "67";
     options.Description = "68";
     options.Rating = "69";
     options.Language = "70";
     options.Genres = new[] { "genre" };
     options.Producers = new[] { "producer" };
     options.Actors = new[] { new PersonWithRole ("artist", "role") };
     options.Directors = new[] { "director" };
     options.Publishers = new[] { "publisher" };
     options.Relations = new[] { new Uri ("http://relation") };
 }
Beispiel #8
0
 public void VideoItemInstantiation ()
 {
     var options = new VideoItemOptions ();
     SetVideoItemOptions (options);
     var video_item = new VideoItem ("-1", "-1", options);
     AssertVideoItem (video_item, options);
     AssertVideoItem (video_item, video_item.GetOptions ());
 }
Beispiel #9
0
 public new VideoItemOptions GetOptions ()
 {
     var options = new VideoItemOptions ();
     CopyToOptions (options);
     return options;
 }