コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }