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

            CopyToOptions(options);
            return(options);
        }
Beispiel #2
0
 public ImageItem(string id, string parentId, ImageItemOptions options)
     : base(id, parentId, options)
 {
     LongDescription = options.LongDescription;
     StorageMedium   = options.StorageMedium;
     Rating          = options.Rating;
     Description     = options.Description;
     Date            = options.Date;
     Publishers      = Helper.MakeReadOnlyCopy(options.Publishers);
     Rights          = Helper.MakeReadOnlyCopy(options.Rights);
 }
Beispiel #3
0
 public ImageItem (string id, string parentId, ImageItemOptions options)
     : base (id, parentId, options)
 {
     LongDescription = options.LongDescription;
     StorageMedium = options.StorageMedium;
     Rating = options.Rating;
     Description = options.Description;
     Date = options.Date;
     Publishers = Helper.MakeReadOnlyCopy (options.Publishers);
     Rights = Helper.MakeReadOnlyCopy (options.Rights);
 }
Beispiel #4
0
        protected void CopyToOptions(ImageItemOptions options)
        {
            base.CopyToOptions(options);

            options.LongDescription = LongDescription;
            options.StorageMedium   = StorageMedium;
            options.Rating          = Rating;
            options.Description     = Description;
            options.Date            = Date;
            options.Publishers      = new List <string> (Publishers);
            options.Rights          = new List <string> (Rights);
        }
Beispiel #5
0
        protected void CopyToOptions (ImageItemOptions options)
        {
            base.CopyToOptions (options);

            options.LongDescription = LongDescription;
            options.StorageMedium = StorageMedium;
            options.Rating = Rating;
            options.Description = Description;
            options.Date = Date;
            options.Publishers = new List<string> (Publishers);
            options.Rights = new List<string> (Rights);
        }
Beispiel #6
0
 static void AssertImageItem (ImageItem imageItem, ImageItemOptions options)
 {
     AssertItem (imageItem, options);
     Assert.AreEqual (imageItem.LongDescription, options.LongDescription);
     Assert.AreEqual (imageItem.Description, options.Description);
     Assert.AreEqual (imageItem.StorageMedium, options.StorageMedium);
     Assert.AreEqual (imageItem.Rating, options.Rating);
     Assert.AreEqual (imageItem.Date, options.Date);
     Assert.IsTrue (imageItem.Publishers.IsReadOnly);
     Assert.IsTrue (imageItem.Rights.IsReadOnly);
     CollectionAssert.AreEqual (imageItem.Publishers, options.Publishers);
     CollectionAssert.AreEqual (imageItem.Rights, options.Rights);
 }
Beispiel #7
0
 static void SetImageItemOptions (ImageItemOptions options)
 {
     SetItemOptions (options);
     options.LongDescription = "25";
     options.Description = "26";
     options.StorageMedium = "27";
     options.Rating = "28";
     options.Date = "29";
     options.Publishers = new[] { "publisher" };
     options.Rights = new[] { "right" };
 }
Beispiel #8
0
 public void ImageItemInstantiation ()
 {
     var options = new ImageItemOptions ();
     SetImageItemOptions (options);
     var image_item = new ImageItem ("-1", "-1", options);
     AssertImageItem (image_item, options);
     AssertImageItem (image_item, image_item.GetOptions ());
 }
Beispiel #9
0
 public new ImageItemOptions GetOptions ()
 {
     var options = new ImageItemOptions ();
     CopyToOptions (options);
     return options;
 }