Example #1
0
        public static IEnumerable <SlotWithAttachment> GenerateFromImage(ImageAttachment image)
        {
            if (image != null && image.Original != null)
            {
                yield return new SlotWithAttachment()
                       {
                           Attachment = image.Original,
                           SlotId     = "__PHOTO__"
                       }
            }
            ;
            ;
            if (image != null && image.Thumbnail != null)
            {
                yield return new SlotWithAttachment()
                       {
                           Attachment = image.Thumbnail,
                           SlotId     = "__PHOTO_THUMB__"
                       }
            }
            ;
            yield break;
        }
    }
}
 public static IEnumerable<SlotWithAttachment> GenerateFromImage(ImageAttachment image)
 {
     if (image != null && image.Original != null)
         yield return new SlotWithAttachment()
         {
             Attachment = image.Original,
             SlotId = "__PHOTO__"
         };
     ;
     if (image != null && image.Thumbnail != null)
         yield return new SlotWithAttachment()
         {
             Attachment = image.Thumbnail,
             SlotId = "__PHOTO_THUMB__"
         };
     yield break;
 }