public IEnumerable<PictureQueryItem> Convert(IEnumerable<PictureQueryItemJson> jsonItems)
        {
            var qitems = new List<PictureQueryItem>();

            foreach (var pictureQueryItemJson in jsonItems)
            {
                var newqitem = new PictureQueryItem()
                {
                    StartTime = ConvertStringToTimeSpan(pictureQueryItemJson.StartTime),
                    Link = pictureQueryItemJson.Link,
                    Name = pictureQueryItemJson.Name,
                    ImageData=pictureQueryItemJson.ImageData,
                    ImageMimeType="."+pictureQueryItemJson.ImageMimeType.Substring(6)
                };
                qitems.Add(newqitem);
            }
            return qitems;
        }
Example #2
0
        public IEnumerable <PictureQueryItem> Convert(IEnumerable <PictureQueryItemJson> jsonItems)
        {
            var qitems = new List <PictureQueryItem>();

            foreach (var pictureQueryItemJson in jsonItems)
            {
                var newqitem = new PictureQueryItem()
                {
                    StartTime     = ConvertStringToTimeSpan(pictureQueryItemJson.StartTime),
                    Link          = pictureQueryItemJson.Link,
                    Name          = pictureQueryItemJson.Name,
                    ImageData     = pictureQueryItemJson.ImageData,
                    ImageMimeType = "." + pictureQueryItemJson.ImageMimeType.Substring(6)
                };
                qitems.Add(newqitem);
            }
            return(qitems);
        }