static void ReceviceDebugMsg(SyncSession session, ProtocolRequestBase e) { Protocol.DebugMsg msg = new Protocol.DebugMsg(); msg.frame = (int)e.m_data["frame"]; { List <Dictionary <string, object> > data2 = (List <Dictionary <string, object> >)e.m_data["infos"]; List <Protocol.EntityInfo> list2 = new List <Protocol.EntityInfo>(); for (int i2 = 0; i2 < data2.Count; i2++) { Protocol.EntityInfo tmp2 = new Protocol.EntityInfo(); tmp2.id = (int)data2[i2]["id"]; { List <Dictionary <string, object> > data4 = (List <Dictionary <string, object> >)data2[i2]["infos"]; List <Protocol.ComponentInfo> list4 = new List <Protocol.ComponentInfo>(); for (int i4 = 0; i4 < data4.Count; i4++) { Protocol.ComponentInfo tmp4 = new Protocol.ComponentInfo(); tmp4.m_compName = data4[i4]["m_compname"].ToString(); tmp4.content = data4[i4]["content"].ToString(); list4.Add(tmp4); } tmp2.infos = list4; } list2.Add(tmp2); } msg.infos = list2; } EventService.DispatchTypeEvent(session, msg); }
static void SendDebugMsg(SyncSession session, Protocol.DebugMsg msg) { Dictionary <string, object> data = new Dictionary <string, object>(); data.Add("frame", msg.frame); { List <object> list2 = new List <object>(); for (int i2 = 0; i2 < msg.infos.Count; i2++) { Dictionary <string, object> data2 = new Dictionary <string, object>(); data2.Add("id", msg.infos[i2].id); { List <object> list4 = new List <object>(); for (int i4 = 0; i4 < msg.infos[i2].infos.Count; i4++) { Dictionary <string, object> data4 = new Dictionary <string, object>(); data4.Add("m_compname", msg.infos[i2].infos[i4].m_compName); data4.Add("content", msg.infos[i2].infos[i4].content); list4.Add(data4); } data2.Add("infos", list4); } list2.Add(data2); } data.Add("infos", list2); } session.SendMsg("debugmsg", data); }
static void SendDebugMsg(IProtocolMessageInterface msg) { Protocol.DebugMsg e = (Protocol.DebugMsg)msg; Dictionary <string, object> data = new Dictionary <string, object>(); data.Add("frame", e.frame); { List <object> list2 = new List <object>(); for (int i2 = 0; i2 < e.infos.Count; i2++) { Dictionary <string, object> data2 = new Dictionary <string, object>(); data2.Add("id", e.infos[i2].id); { List <object> list4 = new List <object>(); for (int i4 = 0; i4 < e.infos[i2].infos.Count; i4++) { Dictionary <string, object> data4 = new Dictionary <string, object>(); data4.Add("m_compname", e.infos[i2].infos[i4].m_compName); data4.Add("content", e.infos[i2].infos[i4].content); list4.Add(data4); } data2.Add("infos", list4); } list2.Add(data2); } data.Add("infos", list2); } NetworkManager.SendMessage("debugmsg", data); }