private void NgioReady() { getList getList = new getList(); getList.callWith( this.NgCore, list => this.medalList = list.medals .Cast <medal>() .ToDictionary(m => m.id, m => m.unlocked)); }
public List <SchoolFellow> getSchoolFellowsList(Stream data) { StreamReader reader = new StreamReader(data, Encoding.UTF8); string json = reader.ReadToEnd(); Console.WriteLine(json); JavaScriptSerializer js = new JavaScriptSerializer(); SchoolFellow list = js.Deserialize <SchoolFellow>(json); Console.WriteLine(list.ToString()); List <SchoolFellow> jsonbackLists = new getList().GetList(list); Console.WriteLine("------" + DateTime.Now.ToString() + "-------"); foreach (SchoolFellow stu in jsonbackLists) { Console.WriteLine(stu.RealName + "---" + stu.Address + "---" + stu.Sex + "---" + stu.SpecialityName); } return(jsonbackLists); }