using System; using System.Collections.Generic; using System.Globalization; using Newtonsoft.Json; namespace Filtr.Core.FacebookUsers.Data { [Serializable] public class NativeFacebookUserInfo { public string ID { get; set; } public string Name { get; set; } [JsonProperty(PropertyName = "first_name")] public string FirstName { get; set; } [JsonProperty(PropertyName = "last_name")] public string LastName { get; set; } //public string Link { get; set; } public string UserName { get; set; } public InnerObject HomeTown { get; set; } //public InnerObject Location { get; set; } //public string Quotes { get; set; } public string Gender { get; set; } public string Email { get; set; } public double TimeZone { get; set; } public string Locale { get; set; } public List Languages { get; set; } //public bool Verified { get; set; } public List Artists { get; set; } public List Education { get; set; } //public List Sports { get; set; } //[JsonProperty(PropertyName = "favorite_teams")] //public List FavoriteTeams { get; set; } [JsonProperty(PropertyName = "favorite_athletes")] public List FavoriteAthletes { get; set; } //[JsonProperty(PropertyName = "inspirational_people")] //public List InspirationalPeople { get; set; } public List Work { get; set; } [NonSerialized] private CultureInfo _culture; public CultureInfo Culture { get { if (_culture == null) { if (!string.IsNullOrWhiteSpace(Locale)) { var cultureName = Locale.Replace('_', '-'); try { _culture = CultureInfo.GetCultureInfo(cultureName); } catch (Exception) { } } } return _culture; } } } [Serializable] public class InnerObject { public string ID { get; set; } public string Name { get; set; } } [Serializable] public class Education { public InnerObject School { get; set; } public InnerObject Year { get; set; } public string Type { get; set; } } [Serializable] public class Work { public InnerObject Employer { get; set; } public InnerObject Location { get; set; } //[JsonProperty(PropertyName = "start_date")] //public DateTime? StartDate { get; set; } } }