Пример #1
0
    // Token: 0x06000EC8 RID: 3784 RVA: 0x00044F60 File Offset: 0x00043160
    private Class156 method_4(char char_1)
    {
        int        num        = this.int_0;
        int?       num2       = null;
        List <int> list       = null;
        int        num3       = 0;
        int?       nullable_  = null;
        int?       nullable_2 = null;
        int?       nullable_3 = null;

        while (this.int_0 < this.string_0.Length)
        {
            char c = this.string_0[this.int_0];
            if (c == ' ')
            {
                num2 = new int?(this.int_0);
                this.method_5();
            }
            else if (c == char_1)
            {
                int num4 = (num2 ?? this.int_0) - num;
                if (list != null)
                {
                    if (num4 == 0)
                    {
                        throw new JsonException("Array index expected.");
                    }
                    int item = Convert.ToInt32(this.string_0.Substring(num, num4), CultureInfo.InvariantCulture);
                    list.Add(item);
                    Class158 @class = new Class158();
                    @class.method_1(list);
                    return(@class);
                }
                else
                {
                    if (num3 > 0)
                    {
                        if (num4 > 0)
                        {
                            int value = Convert.ToInt32(this.string_0.Substring(num, num4), CultureInfo.InvariantCulture);
                            if (num3 == 1)
                            {
                                nullable_2 = new int?(value);
                            }
                            else
                            {
                                nullable_3 = new int?(value);
                            }
                        }
                        Class159 class2 = new Class159();
                        class2.method_1(nullable_);
                        class2.method_3(nullable_2);
                        class2.method_5(nullable_3);
                        return(class2);
                    }
                    if (num4 == 0)
                    {
                        throw new JsonException("Array index expected.");
                    }
                    int      value2 = Convert.ToInt32(this.string_0.Substring(num, num4), CultureInfo.InvariantCulture);
                    Class157 class3 = new Class157();
                    class3.method_1(new int?(value2));
                    return(class3);
                }
            }
            else if (c == ',')
            {
                int num5 = (num2 ?? this.int_0) - num;
                if (num5 == 0)
                {
                    throw new JsonException("Array index expected.");
                }
                if (list == null)
                {
                    list = new List <int>();
                }
                string value3 = this.string_0.Substring(num, num5);
                list.Add(Convert.ToInt32(value3, CultureInfo.InvariantCulture));
                this.int_0++;
                this.method_5();
                num  = this.int_0;
                num2 = null;
            }
            else if (c == '*')
            {
                this.int_0++;
                this.method_17("Path ended with open indexer.");
                this.method_5();
                if (this.string_0[this.int_0] != char_1)
                {
                    throw new JsonException("Unexpected character while parsing path indexer: " + c.ToString());
                }
                return(new Class157());
            }
            else if (c == ':')
            {
                int num6 = (num2 ?? this.int_0) - num;
                if (num6 > 0)
                {
                    int value4 = Convert.ToInt32(this.string_0.Substring(num, num6), CultureInfo.InvariantCulture);
                    if (num3 == 0)
                    {
                        nullable_ = new int?(value4);
                    }
                    else if (num3 == 1)
                    {
                        nullable_2 = new int?(value4);
                    }
                    else
                    {
                        nullable_3 = new int?(value4);
                    }
                }
                num3++;
                this.int_0++;
                this.method_5();
                num  = this.int_0;
                num2 = null;
            }
            else
            {
                if (!char.IsDigit(c) && c != '-')
                {
                    throw new JsonException("Unexpected character while parsing path indexer: " + c.ToString());
                }
                if (num2 != null)
                {
                    throw new JsonException("Unexpected character while parsing path indexer: " + c.ToString());
                }
                this.int_0++;
            }
        }
        throw new JsonException("Path ended with open indexer.");
    }