Esempio n. 1
0
 public static void smethod_1(Enum18 enum181, string string1)
 {
     if (enum181 != Enum18.Const0)
     {
         throw new Exception4(enum181, string1);
     }
 }
Esempio n. 2
0
 public static void smethod_1(Enum18 enum18_1, string string_1)
 {
     if (enum18_1 != Enum18.const_0)
     {
         throw new Exception4(enum18_1, string_1);
     }
 }
Esempio n. 3
0
 public static void smethod_1(Enum18 enum18_1, string string_1)
 {
     if (enum18_1 != Enum18.const_0)
     {
         throw new Exception4(enum18_1, string_1);
     }
 }
Esempio n. 4
0
 // Token: 0x0600125E RID: 4702
 // RVA: 0x0006165C File Offset: 0x0005F85C
 public Class162()
 {
     this.class165_0 = new Class165();
     this.class154_0 = new Class154();
     this.class166_0 = new Class166();
     this.class176_0 = new Class176();
     this.enum20_0 = Enum20.const_1;
     this.enum18_0 = Enum18.const_1;
     this.string_7 = "osu!";
     this.bool_5 = true;
     this.bool_1 = true;
     this.bool_4 = true;
     this.bool_3 = true;
     this.bool_2 = true;
     this.int_2 = 15;
     this.int_1 = 0;
     this.string_8 = string.Empty;
     this.string_6 = string.Empty;
 }
Esempio n. 5
0
        private void method_37()
        {
            object    obj2;
            JsonToken integer;

            this.method_17();
            char c          = this.char_2[this.int_1];
            int  startIndex = this.int_1;

            this.method_25();
            this.struct29_0 = new Struct29(this.char_2, startIndex, this.int_1 - startIndex);
            bool flag  = char.IsDigit(c) && (this.struct29_0.Int32_1 == 1);
            bool flag2 = (((c == '0') && (this.struct29_0.Int32_1 > 1)) && ((this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != '.') && (this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != 'e'))) && (this.struct29_0.Char_0[this.struct29_0.Int32_0 + 1] != 'E');

            if (base.enum14_0 == Enum14.ReadAsInt32)
            {
                if (flag)
                {
                    obj2 = c - '0';
                }
                else if (flag2)
                {
                    string str  = this.struct29_0.ToString();
                    int    num2 = str.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt32(str, 0x10) : Convert.ToInt32(str, 8);
                    obj2 = num2;
                }
                else
                {
                    obj2 = Class181.smethod_15(this.struct29_0.Char_0, this.struct29_0.Int32_0, this.struct29_0.Int32_1);
                }
                integer = JsonToken.Integer;
            }
            else if (base.enum14_0 == Enum14.ReadAsDecimal)
            {
                if (flag)
                {
                    obj2 = c - 48M;
                }
                else if (flag2)
                {
                    string str2 = this.struct29_0.ToString();
                    long   num3 = str2.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(str2, 0x10) : Convert.ToInt64(str2, 8);
                    obj2 = Convert.ToDecimal(num3);
                }
                else
                {
                    obj2 = decimal.Parse(this.struct29_0.ToString(), NumberStyles.Float | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign, CultureInfo.InvariantCulture);
                }
                integer = JsonToken.Float;
            }
            else if (flag)
            {
                obj2    = ((long)c) - 0x30L;
                integer = JsonToken.Integer;
            }
            else if (flag2)
            {
                string str4 = this.struct29_0.ToString();
                obj2    = str4.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? Convert.ToInt64(str4, 0x10) : Convert.ToInt64(str4, 8);
                integer = JsonToken.Integer;
            }
            else
            {
                long   num4;
                Enum18 enum2 = Class181.smethod_16(this.struct29_0.Char_0, this.struct29_0.Int32_0, this.struct29_0.Int32_1, out num4);
                switch (enum2)
                {
                case Enum18.Success:
                    obj2    = num4;
                    integer = JsonToken.Integer;
                    goto Label_032C;

                case Enum18.Invalid:
                {
                    string s = this.struct29_0.ToString();
                    if (base.floatParseHandling_0 == FloatParseHandling.Decimal)
                    {
                        obj2 = decimal.Parse(s, NumberStyles.Float | NumberStyles.AllowThousands | NumberStyles.AllowTrailingSign, CultureInfo.InvariantCulture);
                    }
                    else
                    {
                        obj2 = Convert.ToDouble(s, CultureInfo.InvariantCulture);
                    }
                    integer = JsonToken.Float;
                    goto Label_032C;
                }

                case Enum18.Overflow:
                    obj2    = BigInteger.Parse(this.struct29_0.ToString(), CultureInfo.InvariantCulture);
                    integer = JsonToken.Integer;
                    goto Label_032C;
                }
                if (enum2 != Enum18.Overflow)
                {
                    throw JsonReaderException.smethod_1(this, "Unknown error parsing integer.");
                }
                obj2    = BigInteger.Parse(this.struct29_0.ToString(), CultureInfo.InvariantCulture);
                integer = JsonToken.Integer;
            }
Label_032C:
            this.method_26();
            base.SetToken(integer, obj2);
        }
Esempio n. 6
0
 private static string smethod_0(Enum18 enum181, string string1)
 {
     return(string.Format("{0} calling {1}", enum181, string1));
 }
Esempio n. 7
0
 public Exception4(Enum18 enum181, string string1) : base(smethod_0(enum181, string1))
 {
     _enum180 = enum181;
     _string0 = string1;
 }
Esempio n. 8
0
 public Exception4(Enum18 enum18_1, string string_1) : base(Exception4.smethod_0(enum18_1, string_1))
 {
     this.enum18_0 = enum18_1;
     this.string_0 = string_1;
 }
Esempio n. 9
0
 private static string smethod_0(Enum18 enum18_1, string string_1)
 {
     return string.Format("{0} calling {1}", enum18_1, string_1);
 }
Esempio n. 10
0
 public Exception4(Enum18 enum18_1, string string_1)
     : base(Exception4.smethod_0(enum18_1, string_1))
 {
     this.enum18_0 = enum18_1;
     this.string_0 = string_1;
 }