public override ApolloWakeupInfo FromString(string src) { Debug.Log("WakeUpInfo:" + src); ApolloStringParser apolloStringParser = new ApolloStringParser(src); this.state = (ApolloWakeState)apolloStringParser.GetInt("State"); this.Platform = (ApolloPlatform)apolloStringParser.GetInt("Platform"); this.MediaTagName = apolloStringParser.GetString("MediaTagName"); this.OpenId = apolloStringParser.GetString("OpenId"); this.Lang = apolloStringParser.GetString("Lang"); this.Country = apolloStringParser.GetString("Country"); this.MessageExt = apolloStringParser.GetString("MessageExt"); string @string = apolloStringParser.GetString("ExtInfo"); if (@string != null && string.Empty != @string) { string[] array = @string.Split(new char[] { ',' }); this.ExtensionInfo.Clear(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string src2 = array2[i]; string src3 = ApolloStringParser.ReplaceApolloString(src2); src3 = ApolloStringParser.ReplaceApolloString(src3); ApolloKVPair apolloKVPair = new ApolloKVPair(); apolloKVPair.FromString(src3); this.ExtensionInfo.Add(apolloKVPair); } } return(this); }
public override ApolloToken FromString(string src) { string[] array = src.Split(new char[] { '&' }, 1); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("Type") == 0) { this.Type = (ApolloTokenType)int.Parse(array3[1]); } else if (array3[0].CompareTo("Value") == 0) { this.Value = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("Expire") == 0) { this.Expire = long.Parse(array3[1]); } } } return(this); }
public override ApolloGroupResult FromString(string src) { char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("Result") == 0) { this.result = (ApolloResult)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("ErrorCode") == 0) { this.errorCode = int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("szDescription") == 0) { this.desc = strArray3[1]; } else if (strArray3[0].CompareTo("GroupInfo") == 0) { string str2 = ApolloStringParser.ReplaceApolloString(strArray3[1]); this.groupInfo = new ApolloGroupInfo(); this.groupInfo.FromString(str2); } } } return(this); }
public override ApolloToken FromString(string src) { char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator, StringSplitOptions.RemoveEmptyEntries)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("Type") == 0) { this.Type = (ApolloTokenType)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("Value") == 0) { this.Value = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("Expire") == 0) { this.Expire = long.Parse(strArray3[1]); } } } return(this); }
private void onAccessTokenRefresedProc(string msg) { ADebug.Log("onAccessTokenRefresedProc: " + msg); ApolloStringParser parser = new ApolloStringParser(msg); ListView <ApolloToken> tokenList = null; ApolloResult @int = (ApolloResult)parser.GetInt("Result"); if (@int == ApolloResult.Success) { string src = parser.GetString("tokens"); if (src != null) { src = ApolloStringParser.ReplaceApolloString(src); ADebug.Log("onAccessTokenRefresedProc tokens:" + src); if ((src != null) && (src.Length > 0)) { char[] separator = new char[] { ',' }; string[] strArray = src.Split(separator); tokenList = new ListView <ApolloToken>(); foreach (string str2 in strArray) { string str3 = ApolloStringParser.ReplaceApolloString(ApolloStringParser.ReplaceApolloString(str2)); ApolloToken item = new ApolloToken(); item.FromString(str3); ADebug.Log(string.Format("onAccessTokenRefresedProc str:{0} |||||| {1} |||||{2}", str3, item.Type, item.Value)); tokenList.Add(item); } } } } if (this.RefreshAtkEvent != null) { this.RefreshAtkEvent(@int, tokenList); } }
internal override bool Pack(out string buffer) { base.Pack(out buffer); buffer = buffer + "&name=" + this.Name; buffer = buffer + "&webUrl=" + ApolloStringParser.ReplaceApolloString(this.WebUrl); return(true); }
public override PictureData FromString(string src) { string[] array = src.Split(new char[] { '&' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("PicPath") == 0) { this.PicPath = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("HashValue") == 0) { this.HashValue = ApolloStringParser.ReplaceApolloString(array3[1]); } } } this.Dump(); return(this); }
internal override bool Pack(out string buffer) { base.Pack(out buffer); buffer = buffer + "&picUrl=" + ApolloStringParser.ReplaceApolloString(this.PicUrl); buffer = buffer + "&targetUrl=" + ApolloStringParser.ReplaceApolloString(this.TargetUrl); return(true); }
public override ApolloWakeupInfo FromString(string src) { ApolloStringParser parser = new ApolloStringParser(src); this.state = (ApolloWakeState)parser.GetInt("State"); this.Platform = (ApolloPlatform)parser.GetInt("Platform"); this.MediaTagName = parser.GetString("MediaTagName"); this.OpenId = parser.GetString("OpenId"); this.Lang = parser.GetString("Lang"); this.Country = parser.GetString("Country"); this.MessageExt = parser.GetString("MessageExt"); string str = parser.GetString("ExtInfo"); if ((str != null) && (string.Empty != str)) { char[] separator = new char[] { ',' }; string[] strArray = str.Split(separator); this.ExtensionInfo.Clear(); foreach (string str2 in strArray) { string str3 = ApolloStringParser.ReplaceApolloString(ApolloStringParser.ReplaceApolloString(str2)); ApolloKVPair item = new ApolloKVPair(); item.FromString(str3); this.ExtensionInfo.Add(item); } } return(this); }
internal override bool Pack(out string buffer) { base.Pack(out buffer); buffer = buffer + "&url=" + ApolloStringParser.ReplaceApolloString(this.Url); buffer = buffer + "&width=" + this.Width; buffer = buffer + "&height=" + this.Height; return(true); }
public override ApolloAccountInfo FromString(string src) { Console.WriteLine("ApolloLZK srccc {0}", src); char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("Platform") == 0) { this.Platform = (ApolloPlatform)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("OpenId") == 0) { this.OpenId = strArray3[1]; } else if (strArray3[0].CompareTo("UserId") == 0) { this.UserId = strArray3[1]; } else if (strArray3[0].CompareTo("Uin") == 0) { this.Uin = ulong.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("TokenList") == 0) { char[] chArray3 = new char[] { ',' }; string[] strArray4 = strArray3[1].Split(chArray3); this.TokenList.Clear(); foreach (string str2 in strArray4) { string str3 = ApolloStringParser.ReplaceApolloString(ApolloStringParser.ReplaceApolloString(str2)); ApolloToken item = new ApolloToken(); item.FromString(str3); this.TokenList.Add(item); } } else if (strArray3[0].CompareTo("Pf") == 0) { this.Pf = strArray3[1]; } else if (strArray3[0].CompareTo("PfKey") == 0) { this.PfKey = strArray3[1]; } else if (strArray3[0].CompareTo("STKey") == 0) { this.STKey = strArray3[1]; } } } return(this); }
public override ApolloRelation FromString(string src) { string[] array = src.Split(new char[] { '&' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("Result") == 0) { this.Result = (ApolloResult)int.Parse(array3[1]); } else if (array3[0].CompareTo("Desc") == 0) { this.Desc = array3[1]; } else if (array3[0].CompareTo("InfoList") == 0) { this.Persons.Clear(); if (!string.IsNullOrEmpty(array3[1])) { string[] array4 = array3[1].Split(new char[] { ',' }); string[] array5 = array4; for (int j = 0; j < array5.Length; j++) { string src2 = array5[j]; string src3 = ApolloStringParser.ReplaceApolloString(src2); src3 = ApolloStringParser.ReplaceApolloString(src3); ApolloPerson apolloPerson = new ApolloPerson(); apolloPerson.FromString(src3); this.Persons.Add(apolloPerson); } } } else if (array3[0].CompareTo("ExtInfo") == 0) { this.ExtInfo = array3[1]; } } } return(this); }
public T GetObject <T>(string objName) where T : ApolloStruct <T> { if (objName == null || this.objectCollection.get_Count() == 0) { return((T)((object)null)); } T result = (T)((object)null); if (this.objectCollection.ContainsKey(objName)) { result = (T)((object)Activator.CreateInstance(typeof(T))); string src = this.objectCollection.get_Item(objName); src = ApolloStringParser.ReplaceApolloString(src); result = (T)((object)result.FromString(src)); } return(result); }
private void onAccessTokenRefresedProc(string msg) { ADebug.Log("onAccessTokenRefresedProc: " + msg); ApolloStringParser apolloStringParser = new ApolloStringParser(msg); ListView <ApolloToken> listView = null; ApolloResult @int = (ApolloResult)apolloStringParser.GetInt("Result"); if (@int == ApolloResult.Success) { string text = apolloStringParser.GetString("tokens"); if (text != null) { text = ApolloStringParser.ReplaceApolloString(text); ADebug.Log("onAccessTokenRefresedProc tokens:" + text); if (text != null && text.get_Length() > 0) { string[] array = text.Split(new char[] { ',' }); listView = new ListView <ApolloToken>(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string src = array2[i]; string text2 = ApolloStringParser.ReplaceApolloString(src); text2 = ApolloStringParser.ReplaceApolloString(text2); ApolloToken apolloToken = new ApolloToken(); apolloToken.FromString(text2); ADebug.Log(string.Format("onAccessTokenRefresedProc str:{0} |||||| {1} |||||{2}", text2, apolloToken.Type, apolloToken.Value)); listView.Add(apolloToken); } } } } if (this.RefreshAtkEvent != null) { this.RefreshAtkEvent(@int, listView); } }
public override ApolloRelation FromString(string src) { char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("Result") == 0) { this.Result = (ApolloResult)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("Desc") == 0) { this.Desc = strArray3[1]; } else if (strArray3[0].CompareTo("InfoList") == 0) { this.Persons.Clear(); if (!string.IsNullOrEmpty(strArray3[1])) { char[] chArray3 = new char[] { ',' }; foreach (string str2 in strArray3[1].Split(chArray3)) { string str3 = ApolloStringParser.ReplaceApolloString(ApolloStringParser.ReplaceApolloString(str2)); ApolloPerson item = new ApolloPerson(); item.FromString(str3); this.Persons.Add(item); } } } else if (strArray3[0].CompareTo("ExtInfo") == 0) { this.ExtInfo = strArray3[1]; } } } return(this); }
public override PictureData FromString(string src) { char[] separator = new char[] { '&' }; foreach (string str in src.Split(separator)) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("PicPath") == 0) { this.PicPath = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("HashValue") == 0) { this.HashValue = ApolloStringParser.ReplaceApolloString(strArray3[1]); } } } this.Dump(); return(this); }
public override ApolloGroupResult FromString(string src) { string[] array = src.Split(new char[] { '&' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("Result") == 0) { this.result = (ApolloResult)int.Parse(array3[1]); } else if (array3[0].CompareTo("ErrorCode") == 0) { this.errorCode = int.Parse(array3[1]); } else if (array3[0].CompareTo("szDescription") == 0) { this.desc = array3[1]; } else if (array3[0].CompareTo("GroupInfo") == 0) { string src2 = ApolloStringParser.ReplaceApolloString(array3[1]); this.groupInfo = new ApolloGroupInfo(); this.groupInfo.FromString(src2); } } } return(this); }
public override ApolloNoticeData FromString(string src) { string[] array = src.Split(new char[] { '&' }); this.PicDataList.Clear(); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("MsgID") == 0) { this.MsgID = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("OpenID") == 0) { this.OpenID = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("MsgUrl") == 0) { this.MsgUrl = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("MsgType") == 0) { this.MsgType = (APOLLO_NOTICETYPE)int.Parse(array3[1]); } else if (array3[0].CompareTo("ContentType") == 0) { this.ContentType = (APOLLO_NOTICE_CONTENTTYPE)int.Parse(array3[1]); } else if (array3[0].CompareTo("MsgScene") == 0) { this.MsgScene = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("StartTime") == 0) { this.StartTime = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("EndTime") == 0) { this.EndTime = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("ContentUrl") == 0) { this.ContentUrl = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("MsgTitle") == 0) { this.MsgTitle = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("MsgContent") == 0) { this.MsgContent = ApolloStringParser.ReplaceApolloString(array3[1]); } else if (array3[0].CompareTo("PictureData") == 0) { string text2 = ApolloStringParser.ReplaceApolloStringQuto(array3[1]); string[] array4 = text2.Split(new char[] { ',' }); this.PicDataList.Clear(); string[] array5 = array4; for (int j = 0; j < array5.Length; j++) { string src2 = array5[j]; PictureData pictureData = new PictureData(); pictureData.FromString(src2); this.PicDataList.Add(pictureData); } } } } this.Dump(); return(this); }
public override ApolloNoticeData FromString(string src) { char[] separator = new char[] { '&' }; string[] strArray = src.Split(separator); this.PicDataList.Clear(); foreach (string str in strArray) { char[] chArray2 = new char[] { '=' }; string[] strArray3 = str.Split(chArray2); if (strArray3.Length > 1) { if (strArray3[0].CompareTo("MsgID") == 0) { this.MsgID = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("OpenID") == 0) { this.OpenID = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("MsgUrl") == 0) { this.MsgUrl = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("MsgType") == 0) { this.MsgType = (APOLLO_NOTICETYPE)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("ContentType") == 0) { this.ContentType = (APOLLO_NOTICE_CONTENTTYPE)int.Parse(strArray3[1]); } else if (strArray3[0].CompareTo("MsgScene") == 0) { this.MsgScene = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("StartTime") == 0) { this.StartTime = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("EndTime") == 0) { this.EndTime = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("ContentUrl") == 0) { this.ContentUrl = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("MsgTitle") == 0) { this.MsgTitle = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("MsgContent") == 0) { this.MsgContent = ApolloStringParser.ReplaceApolloString(strArray3[1]); } else if (strArray3[0].CompareTo("PictureData") == 0) { char[] chArray3 = new char[] { ',' }; string[] strArray4 = ApolloStringParser.ReplaceApolloStringQuto(strArray3[1]).Split(chArray3); this.PicDataList.Clear(); foreach (string str3 in strArray4) { PictureData item = new PictureData(); item.FromString(str3); this.PicDataList.Add(item); } } } } this.Dump(); return(this); }
public override ApolloAccountInfo FromString(string src) { Console.WriteLine("ApolloLZK srccc {0}", src); string[] array = src.Split(new char[] { '&' }); string[] array2 = array; for (int i = 0; i < array2.Length; i++) { string text = array2[i]; string[] array3 = text.Split(new char[] { '=' }); if (array3.Length > 1) { if (array3[0].CompareTo("Platform") == 0) { this.Platform = (ApolloPlatform)int.Parse(array3[1]); } else if (array3[0].CompareTo("OpenId") == 0) { this.OpenId = array3[1]; } else if (array3[0].CompareTo("UserId") == 0) { this.UserId = array3[1]; } else if (array3[0].CompareTo("Uin") == 0) { this.Uin = ulong.Parse(array3[1]); } else if (array3[0].CompareTo("TokenList") == 0) { string[] array4 = array3[1].Split(new char[] { ',' }); this.TokenList.Clear(); string[] array5 = array4; for (int j = 0; j < array5.Length; j++) { string src2 = array5[j]; string src3 = ApolloStringParser.ReplaceApolloString(src2); src3 = ApolloStringParser.ReplaceApolloString(src3); ApolloToken apolloToken = new ApolloToken(); apolloToken.FromString(src3); this.TokenList.Add(apolloToken); } } else if (array3[0].CompareTo("Pf") == 0) { this.Pf = array3[1]; } else if (array3[0].CompareTo("PfKey") == 0) { this.PfKey = array3[1]; } else if (array3[0].CompareTo("STKey") == 0) { this.STKey = array3[1]; } } } return(this); }