/*----------------------------------------------- *本文件由代码生成器自动生成, *千万不要修改本文件的任何代码, *修改的的任何代码都会被覆盖掉! --------------------------------------------------*/ using System.IO; using System; using System.Collections.Generic; using System.Linq; using System.Text; using Pomelo.DotNetClient; namespace pomelo.revelry { public class ActivityRevelryHandler { private PomeloClient _socket; public RevelryGetColumnResponse lastRevelryGetColumnResponse { get { return _socket.GetLastResponse(); } } public RevelryGetRankInfoResponse lastRevelryGetRankInfoResponse { get { return _socket.GetLastResponse(); } } public RevelryExchangeResponse lastRevelryExchangeResponse { get { return _socket.GetLastResponse(); } } public RevelryRechargeGetColumnResponse lastRevelryRechargeGetColumnResponse { get { return _socket.GetLastResponse(); } } public RevelryRechargeGetInfoResponse lastRevelryRechargeGetInfoResponse { get { return _socket.GetLastResponse(); } } public RevelryRechargeAwardResponse lastRevelryRechargeAwardResponse { get { return _socket.GetLastResponse(); } } static ActivityRevelryHandler() { EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryGetColumnRequest", typeof(RevelryGetColumnRequest), typeof(RevelryGetColumnResponse)); EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryGetRankInfoRequest", typeof(RevelryGetRankInfoRequest), typeof(RevelryGetRankInfoResponse)); EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryExchangeRequest", typeof(RevelryExchangeRequest), typeof(RevelryExchangeResponse)); EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryRechargeGetColumnRequest", typeof(RevelryRechargeGetColumnRequest), typeof(RevelryRechargeGetColumnResponse)); EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryRechargeGetInfoRequest", typeof(RevelryRechargeGetInfoRequest), typeof(RevelryRechargeGetInfoResponse)); EventTypes.RegistRequestType("revelry.activityRevelryHandler.revelryRechargeAwardRequest", typeof(RevelryRechargeAwardRequest), typeof(RevelryRechargeAwardResponse)); } public ActivityRevelryHandler(PomeloClient socket) { this._socket = socket; } public void revelryGetColumnRequest(Action cb,object option = null) { var request = new RevelryGetColumnRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryGetColumnResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void revelryGetRankInfoRequest(string id,Action cb,object option = null) { var request = new RevelryGetRankInfoRequest(); request.id= id; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryGetRankInfoResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void revelryExchangeRequest(int id,int num,Action cb,object option = null) { var request = new RevelryExchangeRequest(); request.id= id; request.num= num; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryExchangeResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void revelryRechargeGetColumnRequest(Action cb,object option = null) { var request = new RevelryRechargeGetColumnRequest(); _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryRechargeGetColumnResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void revelryRechargeGetInfoRequest(int day,Action cb,object option = null) { var request = new RevelryRechargeGetInfoRequest(); request.day= day; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryRechargeGetInfoResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } public void revelryRechargeAwardRequest(int id,Action cb,object option = null) { var request = new RevelryRechargeAwardRequest(); request.id= id; _socket.request(request, (object msg, out int s2c_code, out string s2c_msg) => { var rsp = msg as RevelryRechargeAwardResponse; s2c_code = rsp.s2c_code; s2c_msg = rsp.s2c_msg; return s2c_code == 200; }, cb, option); } } }