public MovieCastInfo(string baseUrl, string size, Person.Cast2 cast) { this.Title = cast.Title; this.Character = cast.Character; try { DateTime dtRelease = DateTime.MinValue; if (!String.IsNullOrWhiteSpace(cast.ReleaseDate)) { dtRelease = DateTime.ParseExact(cast.ReleaseDate, "yyyy-MM-dd", CultureInfo.InvariantCulture); } if (dtRelease != DateTime.MinValue) { this.ReleaseDate = dtRelease.ToString("dd MMM yyyy"); } } catch { } if (String.IsNullOrWhiteSpace(cast.PosterPath)) { #if WINDOWS_PHONE this.PosterUrl = new Uri("Images/PlaceHolder.png", UriKind.Relative); #else this.PosterUrl = new Uri("ms-appx:/Assets/PlaceHolder.png"); #endif } else { this.PosterUrl = new Uri(String.Format("{0}{1}{2}", baseUrl, size, cast.PosterPath)); } }
public MovieCastInfo(string baseUrl, string size, Person.Cast2 cast) { this.Title = cast.Title; this.Character = cast.Character; try { DateTime dtRelease = DateTime.MinValue; if (!String.IsNullOrWhiteSpace(cast.ReleaseDate)) { dtRelease = DateTime.ParseExact(cast.ReleaseDate, "yyyy-MM-dd", CultureInfo.InvariantCulture); } if (dtRelease != DateTime.MinValue) { this.ReleaseDate = dtRelease.ToString("dd MMM yyyy"); } } catch { } if (!String.IsNullOrWhiteSpace(cast.PosterPath)) { this.PosterUrl = new Uri(String.Format("{0}{1}{2}", baseUrl, size, cast.PosterPath)); } }