Ejemplo n.º 1
0
        private static async Task <ImageDetectionReferenceItem <MeetupProfile> > GetItemOrNull(MeetupProfile profile)
        {
            var detectUrl  = profile.Photo.detect_link;
            var displayUrl = profile.Photo.display_link ?? detectUrl;

            if (detectUrl == null)
            {
                return(null);
            }

            byte[] imgData     = null;
            byte[] displayData = null;

            try
            {
                imgData = await _httpClient.GetByteArrayAsync(detectUrl);

                displayData = await _httpClient.GetByteArrayAsync(displayUrl);
            }
            catch (Exception ex) { Debug.WriteLine(ex); return(null); }

            return(new ImageDetectionReferenceItem <MeetupProfile>
            {
                ItemData = profile,
                ImageData = imgData,
                DisplayData = displayData,
                RealWorldSizeCms = 6.6f
            });
        }
Ejemplo n.º 2
0
 public DisplayMeetupProfileViewController(MeetupProfile profile)
 {
     Profile = profile;
 }