private void Request <T>(RequestInfo reqInfo) { if (reqInfo == null) { return; } try { EventDispatcher.Instance().RegistEventListener(reqInfo.route, reqInfo.eventCallback); EventDispatcher.Instance().RegistEventListener(NetDataRequestTip.NET_REQUEST_END, NetDataRequestTip.endReq); NetDataRequestTip.startReq(null); Action <JsonObject> requestCallback = delegate(JsonObject obj) { Debug.Log("Route:" + reqInfo.route); Debug.Log("Date:" + obj.ToString()); if (!requestList.Remove(reqInfo)) { Debug.Log("Can not found request info in list!"); } CommonResult <T> commonResult = AnalysisData <T>(obj); if (requestList.Count <= 0) { EventDispatcher.Instance().DispatchEvent(NetDataRequestTip.NET_REQUEST_END, true); } EventDispatcher.Instance().DispatchEvent(reqInfo.route, commonResult); }; if (reqInfo.dataType == RequestInfo.DataType.Type_JsonObject) { //Debug.Log("(JsonObject)reqInfo.data =" + (JsonObject)reqInfo.data); //Debug.Log("reqInfo.route =" + reqInfo.route); //Debug.Log("requestCallback =" + requestCallback); //Debug.Log("this =" + this); //Debug.Log("pclient =" + pclient); pclient.request(reqInfo.route, (JsonObject)reqInfo.data, requestCallback); } else if (reqInfo.dataType == RequestInfo.DataType.Type_String) { pclient.requestByJsonStr(reqInfo.route, (string)reqInfo.data, requestCallback); } else { Debug.Log("Request info data type is error!"); return; } }catch (Exception e) { Debug.LogException(e); } }