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 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); }