public RemoteFile(FlickrNet.Photo p) { GeoLocation = GeoLocation.Zero; PhotoId = p.PhotoId; PathTag = p.Tags.FirstOrDefault(t => t.IsPathTag()); Description = p.Description; Title = p.Title; if (!string.IsNullOrEmpty(p.OriginalUrl)) { LinkOriginal = new RemoteUrl { Url = p.OriginalUrl, Width = p.OriginalWidth, Height = p.OriginalHeight }; } if (!string.IsNullOrEmpty(p.ThumbnailUrl)) { LinkThumbnail = new RemoteUrl { Url = p.ThumbnailUrl, Width = p.ThumbnailWidth ?? 0, Height = p.ThumbnailHeight ?? 0 }; } if (Math.Abs(p.Latitude) > 0.1 && Math.Abs(p.Longitude) > 0.1) { GeoLocation = new GeoLocation(p.Latitude, p.Longitude); } }
private static Photo Map(FlickrNet.Photo photo) { return(new Photo { Id = photo.PhotoId, OriginalUrl = photo.OriginalUrl, OriginalWidth = photo.OriginalWidth, OriginalHeigth = photo.OriginalHeight, LargeUrl = photo.LargeUrl, LargeWidth = photo.LargeWidth, LargeHeight = photo.LargeHeight, MediumUrl = photo.MediumUrl, MediumWidth = photo.MediumWidth, MediumHeight = photo.MediumHeight, SmallUrl = photo.SmallUrl, SmallWidth = photo.SmallWidth, SmallHeight = photo.SmallHeight, WebUrl = photo.WebUrl, Description = photo.Description, Title = photo.Title, }); }
public Photo(FlickrNet.Photo p, Photoset ps) : this(p) { if (ps != null) { PhotosetTitle = ps.Title; PhotosetId = ps.PhotosetId; } }
public Photo(FlickrNet.Photo photo, string urlFormat) { OwnerName = photo.OwnerName; DateTaken = photo.DateTaken; Latitude = photo.Latitude; Longitude = photo.Longitude; Title = photo.Title; ThumbnailUrl = string.Format(urlFormat, Uri.EscapeUriString(photo.ThumbnailUrl)); }
public Photo(FlickrNet.Photo p) : this() { Title = p.Title; Description = p.Description; PhotoId = p.PhotoId; Tags = p.Tags.ToList <string>(); DateTaken = p.DateTaken; OwnerName = p.OwnerName; OriginalUrl = p.OriginalUrl; }