Пример #1
0
    // Token: 0x06000ED4 RID: 3796 RVA: 0x00045B54 File Offset: 0x00043D54
    private Class156 method_16(char char_1, bool bool_0)
    {
        List <string> list = null;

        while (this.int_0 < this.string_0.Length)
        {
            string text = this.method_12();
            this.method_5();
            this.method_17("Path ended with open indexer.");
            if (this.string_0[this.int_0] == char_1)
            {
                if (list == null)
                {
                    return(Class155.smethod_0(text, bool_0));
                }
                list.Add(text);
                if (!bool_0)
                {
                    Class161 @class = new Class161();
                    @class.method_1(list);
                    return(@class);
                }
                Class166 class2 = new Class166();
                class2.method_1(list);
                return(class2);
            }
            else
            {
                if (this.string_0[this.int_0] != ',')
                {
                    throw new JsonException("Unexpected character while parsing path indexer: " + this.string_0[this.int_0].ToString());
                }
                this.int_0++;
                this.method_5();
                if (list == null)
                {
                    list = new List <string>();
                }
                list.Add(text);
            }
        }
        throw new JsonException("Path ended with open indexer.");
    }
Пример #2
0
    // Token: 0x06000EC5 RID: 3781 RVA: 0x00044C68 File Offset: 0x00042E68
    private bool method_2(List <Class156> list_1, int int_1, bool bool_0)
    {
        bool bool_ = false;
        bool flag  = false;
        bool flag2 = false;
        bool flag3 = false;

        while (this.int_0 < this.string_0.Length && !flag3)
        {
            char c = this.string_0[this.int_0];
            if (c <= ')')
            {
                if (c != ' ')
                {
                    if (c == '(')
                    {
                        goto IL_C3;
                    }
                    if (c == ')')
                    {
                        goto IL_BC;
                    }
                }
                else
                {
                    if (this.int_0 < this.string_0.Length)
                    {
                        flag3 = true;
                        continue;
                    }
                    continue;
                }
            }
            else
            {
                if (c == '.')
                {
                    if (this.int_0 > int_1)
                    {
                        string text = this.string_0.Substring(int_1, this.int_0 - int_1);
                        if (text == "*")
                        {
                            text = null;
                        }
                        list_1.Add(Class155.smethod_0(text, bool_));
                        bool_ = false;
                    }
                    if (this.int_0 + 1 < this.string_0.Length && this.string_0[this.int_0 + 1] == '.')
                    {
                        bool_ = true;
                        this.int_0++;
                    }
                    this.int_0++;
                    int_1 = this.int_0;
                    flag  = false;
                    flag2 = true;
                    continue;
                }
                if (c == '[')
                {
                    goto IL_C3;
                }
                if (c == ']')
                {
                    goto IL_BC;
                }
            }
            if (bool_0 && (c == '=' || c == '<' || c == '!' || c == '>' || c == '|' || c == '&'))
            {
                flag3 = true;
                continue;
            }
            if (!flag)
            {
                this.int_0++;
                continue;
            }
            throw new JsonException("Unexpected character following indexer: " + c.ToString());
IL_BC:
            flag3 = true;
            continue;
IL_C3:
            if (this.int_0 > int_1)
            {
                string text2 = this.string_0.Substring(int_1, this.int_0 - int_1);
                if (text2 == "*")
                {
                    text2 = null;
                }
                list_1.Add(Class155.smethod_0(text2, bool_));
                bool_ = false;
            }
            list_1.Add(this.method_3(c, bool_));
            this.int_0++;
            int_1 = this.int_0;
            flag  = true;
            flag2 = false;
        }
        bool flag4 = this.int_0 == this.string_0.Length;

        if (this.int_0 > int_1)
        {
            string text3 = this.string_0.Substring(int_1, this.int_0 - int_1).TrimEnd(new char[0]);
            if (text3 == "*")
            {
                text3 = null;
            }
            list_1.Add(Class155.smethod_0(text3, bool_));
        }
        else if (flag2 && (flag4 || bool_0))
        {
            throw new JsonException("Unexpected end while parsing path.");
        }
        return(flag4);
    }