Exemplo n.º 1
0
 public static PictureDTO GetImage(PictureInfoDTO pictureInfo)
 {
     return(exceptionHandling(delegate
     {
         BodyArchitect.Client.WCF.Automatic.PictureInfoDTO info =
             new Automatic.PictureInfoDTO();
         info.Hash = pictureInfo.Hash;
         info.PictureId = pictureInfo.PictureId;
         info.SessionId = Token.SessionId;
         var result = Instance.GetImage(info);
         PictureDTO dto = new PictureDTO(pictureInfo);
         dto.ImageStream = result.ImageStream;
         dto.PictureId = result.PictureId;
         dto.Hash = result.Hash;
         return dto;
     }));
 }
Exemplo n.º 2
0
        public static PictureInfoDTO UploadImage(PictureDTO picture)
        {
            return(exceptionHandling(delegate
            {
                var dto = new Automatic.PictureDTO();
                dto.ImageStream = picture.ImageStream;
                dto.PictureId = picture.PictureId;
                dto.Hash = picture.Hash;
                dto.SessionId = picture.SessionId;
                var result = Instance.UploadImage(dto);

                PictureInfoDTO info = new PictureInfoDTO(picture);
                info.Hash = result.Hash;
                info.PictureId = result.PictureId;
                return info;
            }));
        }
Exemplo n.º 3
0
        public object Clone()
        {
            PictureInfoDTO info = new PictureInfoDTO(PictureId, Hash);

            return(info);
        }