private static List <GDMatchEvent> DeserializeMatchEvents(List <object> eventsList) { List <GDMatchEvent> events = new List <GDMatchEvent> (); foreach (object eventObj in eventsList) { Dictionary <string, object> eventMap = (Dictionary <string, object>)eventObj; GDMatchEvent theEvent = new GDMatchEvent(); theEvent._id = Convert.ToString(eventMap["_id"]); theEvent.eventType = Convert.ToInt32(eventMap["eventType"]); theEvent.previousState = Convert.ToString(eventMap["previousState"]); theEvent.newState = Convert.ToString(eventMap["newState"]); theEvent.userId = Convert.ToString(eventMap["userId"]); events.Add(theEvent); } return(events); }
private static List<GDMatchEvent> DeserializeMatchEvents(List<object> eventsList ) { List<GDMatchEvent> events = new List<GDMatchEvent> (); foreach (object eventObj in eventsList) { Dictionary<string,object> eventMap = (Dictionary<string,object>)eventObj; GDMatchEvent theEvent = new GDMatchEvent(); theEvent._id = Convert.ToString(eventMap["_id"]); theEvent.eventType = Convert.ToInt32(eventMap["eventType"]); theEvent.previousState = Convert.ToString(eventMap["previousState"]); theEvent.newState = Convert.ToString(eventMap["newState"]); theEvent.userId = Convert.ToString(eventMap["userId"]); events.Add(theEvent); } return events; }