public ArchivedEntryPictureFileContract(EntryPictureFile entryPictureFile)
        {
            ParamIs.NotNull(() => entryPictureFile);

            Author  = new ObjectRefContract(entryPictureFile.Author);
            Created = entryPictureFile.Created;
            Id      = entryPictureFile.Id;
            Mime    = entryPictureFile.Mime;
            Name    = entryPictureFile.Name;
        }
Ejemplo n.º 2
0
        public EntryPictureFileContract(EntryPictureFile picture)
        {
            ParamIs.NotNull(() => picture);

            EntryType = picture.EntryType;
            FileName  = picture.FileName;
            Id        = picture.Id;
            Mime      = picture.Mime;
            Name      = picture.Name;
        }
Ejemplo n.º 3
0
        public EntryPictureFileContract(EntryPictureFile picture)
        {
            ParamIs.NotNull(() => picture);

            EntryType = picture.EntryType;
            FileName  = picture.FileName;
            Id        = picture.Id;
            Mime      = picture.Mime;
            Name      = picture.Name;
            ThumbUrl  = ImageHelper.GetImageUrlThumb(this);
        }
Ejemplo n.º 4
0
        public EntryPictureFileContract(EntryPictureFile picture, IEntryImagePersister imageStore)
        {
            ParamIs.NotNull(() => picture);

            EntryType    = picture.EntryType;
            Id           = picture.Id;
            Mime         = picture.Mime;
            Name         = picture.Name;
            OwnerEntryId = picture.OwnerEntryId;
            ThumbUrl     = imageStore.GetUrlAbsolute(picture, ImageSize.Thumb, true);
        }
Ejemplo n.º 5
0
        public EntryPictureFileContract(EntryPictureFile picture, IAggregatedEntryImageUrlFactory imageStore)
        {
            ParamIs.NotNull(() => picture);

            EntryType    = picture.EntryType;
            Id           = picture.Id;
            Mime         = picture.Mime;
            Name         = picture.Name;
            OwnerEntryId = picture.OwnerEntryId;
            ThumbUrl     = imageStore.GetUrlAbsolute(picture, ImageSize.Thumb, true);
            Purpose      = picture.Purpose;
        }
Ejemplo n.º 6
0
 public static string GetImageUrlThumb(EntryPictureFileContract picture)
 {
     return(GetImageUrl(picture.EntryType, EntryPictureFile.GetFileNameThumb(picture.Id, picture.Mime)));
 }
Ejemplo n.º 7
0
 public static string GetImagePathThumb(EntryPictureFile picture)
 {
     return(GetImagePath(picture.EntryType, EntryPictureFile.GetFileNameThumb(picture.Id, picture.Mime)));
 }
Ejemplo n.º 8
0
 public static string GetImagePath(EntryPictureFileContract picture)
 {
     return(GetImagePath(picture.EntryType, EntryPictureFile.GetFileName(picture.Id, picture.Mime)));
 }