public void InitializeData(IDictionary JSON) { if(JSON.Contains("id")) { _id = System.Convert.ToString(JSON["id"]); } if(JSON.Contains("birthday")) { _Birthday =DateTime.Parse(System.Convert.ToString(JSON["birthday"])); } if(JSON.Contains("name")) { _name = System.Convert.ToString(JSON["name"]); } if(JSON.Contains("first_name")) { _first_name = System.Convert.ToString(JSON["first_name"]); } if(JSON.Contains("last_name")) { _last_name = System.Convert.ToString(JSON["last_name"]); } if(JSON.Contains("username")) { _username = System.Convert.ToString(JSON["username"]); } if(JSON.Contains("link")) { _profile_url = System.Convert.ToString(JSON["link"]); } if(JSON.Contains("email")) { _email = System.Convert.ToString(JSON["email"]); } if(JSON.Contains("locale")) { _locale = System.Convert.ToString(JSON["locale"]); } if(JSON.Contains("location")) { IDictionary loc = JSON["location"] as IDictionary; _location = System.Convert.ToString(loc["name"]); } if(JSON.Contains("gender")) { string g = System.Convert.ToString(JSON["gender"]); if(g.Equals("male")) { _gender = FB_Gender.Male; } else { _gender = FB_Gender.Female; } } }
public void InitializeData(IDictionary JSON) { if (JSON.Contains("id")) { _id = System.Convert.ToString(JSON["id"]); } if (JSON.Contains("birthday")) { _Birthday = DateTime.Parse(System.Convert.ToString(JSON["birthday"])); } if (JSON.Contains("name")) { _name = System.Convert.ToString(JSON["name"]); } if (JSON.Contains("first_name")) { _first_name = System.Convert.ToString(JSON["first_name"]); } if (JSON.Contains("last_name")) { _last_name = System.Convert.ToString(JSON["last_name"]); } if (JSON.Contains("username")) { _username = System.Convert.ToString(JSON["username"]); } if (JSON.Contains("link")) { _profile_url = System.Convert.ToString(JSON["link"]); } if (JSON.Contains("email")) { _email = System.Convert.ToString(JSON["email"]); } if (JSON.Contains("locale")) { _locale = System.Convert.ToString(JSON["locale"]); } if (JSON.Contains("location")) { IDictionary loc = JSON["location"] as IDictionary; _location = System.Convert.ToString(loc["name"]); } if (JSON.Contains("gender")) { string g = System.Convert.ToString(JSON["gender"]); if (g.Equals("male")) { _gender = FB_Gender.Male; } else { _gender = FB_Gender.Female; } } if (JSON.Contains("age_range")) { IDictionary age = JSON["age_range"] as IDictionary; _ageRange = (age.Contains("min")) ? age["min"].ToString() : "0"; _ageRange += "-"; _ageRange += (age.Contains("max")) ? age["max"].ToString() : "1000"; } if (JSON.Contains("picture")) { IDictionary picDict = JSON["picture"] as IDictionary; if (picDict != null && picDict.Contains("data")) { IDictionary data = picDict["data"] as IDictionary; if (data != null && data.Contains("url")) { _picUrl = System.Convert.ToString(data["url"]); } } } }
public void InitializeData(IDictionary JSON) { if(JSON.Contains("id")) { _id = System.Convert.ToString(JSON["id"]); } if(JSON.Contains("birthday")) { _Birthday =DateTime.Parse(System.Convert.ToString(JSON["birthday"])); } if(JSON.Contains("name")) { _name = System.Convert.ToString(JSON["name"]); } if(JSON.Contains("first_name")) { _first_name = System.Convert.ToString(JSON["first_name"]); } if(JSON.Contains("last_name")) { _last_name = System.Convert.ToString(JSON["last_name"]); } if(JSON.Contains("username")) { _username = System.Convert.ToString(JSON["username"]); } if(JSON.Contains("link")) { _profile_url = System.Convert.ToString(JSON["link"]); } if(JSON.Contains("email")) { _email = System.Convert.ToString(JSON["email"]); } if(JSON.Contains("locale")) { _locale = System.Convert.ToString(JSON["locale"]); } if(JSON.Contains("location")) { IDictionary loc = JSON["location"] as IDictionary; _location = System.Convert.ToString(loc["name"]); } if(JSON.Contains("gender")) { string g = System.Convert.ToString(JSON["gender"]); if(g.Equals("male")) { _gender = FB_Gender.Male; } else { _gender = FB_Gender.Female; } } if(JSON.Contains("age_range")) { IDictionary age = JSON["age_range"] as IDictionary; _ageRange = (age.Contains("min")) ? age["min"].ToString() : "0"; _ageRange += "-"; _ageRange += (age.Contains("max")) ? age["max"].ToString() : "1000"; } if(JSON.Contains("picture")) { IDictionary picDict = JSON["picture"] as IDictionary; if (picDict != null && picDict.Contains("data")) { IDictionary data = picDict["data"] as IDictionary; if (data != null && data.Contains("url")) { _picUrl = System.Convert.ToString(data["url"]); } } } }
public void InitializeData(IDictionary JSON) { if (JSON.Contains("id")) { _id = System.Convert.ToString(JSON["id"]); } if (JSON.Contains("birthday")) { _Birthday = DateTime.Parse(System.Convert.ToString(JSON["birthday"])); } if (JSON.Contains("name")) { _name = System.Convert.ToString(JSON["name"]); } if (JSON.Contains("first_name")) { _first_name = System.Convert.ToString(JSON["first_name"]); } if (JSON.Contains("last_name")) { _last_name = System.Convert.ToString(JSON["last_name"]); } if (JSON.Contains("username")) { _username = System.Convert.ToString(JSON["username"]); } if (JSON.Contains("link")) { _profile_url = System.Convert.ToString(JSON["link"]); } if (JSON.Contains("email")) { _email = System.Convert.ToString(JSON["email"]); } if (JSON.Contains("locale")) { _locale = System.Convert.ToString(JSON["locale"]); } if (JSON.Contains("location")) { IDictionary loc = JSON["location"] as IDictionary; _location = System.Convert.ToString(loc["name"]); } if (JSON.Contains("gender")) { string g = System.Convert.ToString(JSON["gender"]); if (g.Equals("male")) { _gender = FB_Gender.Male; } else { _gender = FB_Gender.Female; } } }