Esempio n. 1
0
        // Token: 0x060011A5 RID: 4517 RVA: 0x00057214 File Offset: 0x00055414
        internal static U Convert <T, U>(this T token) where T : Class_361
        {
            if (token == null)
            {
                return(default(U));
            }
            if (token is U && typeof(U) != typeof(IComparable) && typeof(U) != typeof(IFormattable))
            {
                return((U)((object)token));
            }
            Class_362 class_ = token as Class_362;

            if (class_ == null)
            {
                throw new InvalidCastException("Cannot cast {0} to {1}.".FormatWith(CultureInfo.InvariantCulture, token.GetType(), typeof(T)));
            }
            if (class_.prop_2 is U)
            {
                return((U)((object)class_.prop_2));
            }
            Type type = typeof(U);

            if (Class_514.IsNullableType(type))
            {
                if (class_.prop_2 == null)
                {
                    return(default(U));
                }
                type = Nullable.GetUnderlyingType(type);
            }
            return((U)((object)System.Convert.ChangeType(class_.prop_2, type, CultureInfo.InvariantCulture)));
        }
Esempio n. 2
0
            // Token: 0x06001286 RID: 4742 RVA: 0x00059A64 File Offset: 0x00057C64
            public virtual bool nmethod_1(Class_423 arg_0, SetMemberBinder arg_1, object obje_0)
            {
                Class_361 class_ = obje_0 as Class_361;

                if (class_ == null)
                {
                    class_ = new Class_362(obje_0);
                }
                arg_0.lmethod_3308(arg_1.Name, class_);
                return(true);
            }
Esempio n. 3
0
 // Token: 0x060011D8 RID: 4568 RVA: 0x00057BA4 File Offset: 0x00055DA4
 internal Class_361 vmethod_3205(Class_361 arg_0, bool bool_0)
 {
     if (arg_0 == null)
     {
         return(Class_362.kmethod_2597());
     }
     if (bool_0)
     {
         return(arg_0);
     }
     if (arg_0.prop_1 != null || arg_0 == this || (arg_0.prop_4 && base.prop_2 == arg_0))
     {
         arg_0 = arg_0.kmethod_2447();
     }
     return(arg_0);
 }
Esempio n. 4
0
 // Token: 0x060012D2 RID: 4818 RVA: 0x0005A560 File Offset: 0x00058760
 internal void cmethod_3404(Class_362 arg_0, Class_508 arg_1)
 {
     if (this.field_1 != null)
     {
         this.field_1.lmethod_3218(arg_0);
         this.field_3 = this.field_1.prop_10;
         if (this.field_1.prop_3 == Class_428.Property)
         {
             this.field_1 = this.field_1.prop_1;
             return;
         }
     }
     else
     {
         this.field_2 = (arg_0 ?? Class_362.kmethod_2597());
         this.field_3 = this.field_2;
     }
 }
Esempio n. 5
0
 // Token: 0x060012D7 RID: 4823 RVA: 0x0005A633 File Offset: 0x00058833
 public virtual void pmethod_3409(string str_0)
 {
     base.vmethod_2075(str_0);
     this.cmethod_3404(Class_362.vmethod_2595(str_0), Class_508.Comment);
 }
Esempio n. 6
0
        // Token: 0x060011F1 RID: 4593 RVA: 0x00058320 File Offset: 0x00056520
        internal void smethod_3230(Class_285 arg_0)
        {
            Class_517.ArgumentNotNull(arg_0, "r");
            Class_353 arg_   = arg_0 as Class_353;
            Class_420 class_ = this;

            for (;;)
            {
                if (class_ is Class_427 && ((Class_427)class_).prop_2 != null)
                {
                    if (class_ == this)
                    {
                        break;
                    }
                    class_ = class_.prop_1;
                }
                switch (arg_0.prop_9)
                {
                case Class_508.None:
                    goto IL_22F;

                case Class_508.StartObject:
                {
                    Class_423 class_2 = new Class_423();
                    class_2.lmethod_2568(arg_);
                    class_.lmethod_3218(class_2);
                    class_ = class_2;
                    goto IL_22F;
                }

                case Class_508.StartArray:
                {
                    Class_424 class_3 = new Class_424();
                    class_3.lmethod_2568(arg_);
                    class_.lmethod_3218(class_3);
                    class_ = class_3;
                    goto IL_22F;
                }

                case Class_508.StartConstructor:
                {
                    Class_421 class_4 = new Class_421(arg_0.prop_10.ToString());
                    class_4.lmethod_2568(arg_);
                    class_.lmethod_3218(class_4);
                    class_ = class_4;
                    goto IL_22F;
                }

                case Class_508.PropertyName:
                {
                    string    str_    = arg_0.prop_10.ToString();
                    Class_427 class_5 = new Class_427(str_);
                    class_5.lmethod_2568(arg_);
                    Class_423 class_6 = (Class_423)class_;
                    Class_427 class_7 = class_6.gmethod_3303(str_);
                    if (class_7 == null)
                    {
                        class_.lmethod_3218(class_5);
                    }
                    else
                    {
                        class_7.gmethod_2473(class_5);
                    }
                    class_ = class_5;
                    goto IL_22F;
                }

                case Class_508.Comment:
                {
                    Class_362 class_8 = Class_362.vmethod_2595(arg_0.prop_10.ToString());
                    class_8.lmethod_2568(arg_);
                    class_.lmethod_3218(class_8);
                    goto IL_22F;
                }

                case Class_508.Integer:
                case Class_508.Float:
                case Class_508.String:
                case Class_508.Boolean:
                case Class_508.Date:
                case Class_508.Bytes:
                {
                    Class_362 class_8 = new Class_362(arg_0.prop_10);
                    class_8.lmethod_2568(arg_);
                    class_.lmethod_3218(class_8);
                    goto IL_22F;
                }

                case Class_508.Null:
                {
                    Class_362 class_8 = Class_362.kmethod_2597();
                    class_8.lmethod_2568(arg_);
                    class_.lmethod_3218(class_8);
                    goto IL_22F;
                }

                case Class_508.Undefined:
                {
                    Class_362 class_8 = Class_362.lmethod_2598();
                    class_8.lmethod_2568(arg_);
                    class_.lmethod_3218(class_8);
                    goto IL_22F;
                }

                case Class_508.EndObject:
                    if (class_ == this)
                    {
                        return;
                    }
                    class_ = class_.prop_1;
                    goto IL_22F;

                case Class_508.EndArray:
                    if (class_ == this)
                    {
                        return;
                    }
                    class_ = class_.prop_1;
                    goto IL_22F;

                case Class_508.EndConstructor:
                    if (class_ == this)
                    {
                        return;
                    }
                    class_ = class_.prop_1;
                    goto IL_22F;
                }
                goto Block_4;
IL_22F:
                if (!arg_0.vmethod_1885())
                {
                    return;
                }
            }
            return;

Block_4:
            throw new InvalidOperationException("The JsonReader should not be on a token of type {0}.".FormatWith(CultureInfo.InvariantCulture, arg_0.prop_9));
        }
Esempio n. 7
0
        // Token: 0x060011E3 RID: 4579 RVA: 0x00058124 File Offset: 0x00056324
        internal static bool dmethod_3216(Class_361 arg_0, Class_361 arg_1)
        {
            Class_362 class_ = arg_0 as Class_362;

            return(class_ != null && ((class_.prop_3 == Class_428.Null && arg_1 == null) || class_.Equals(arg_1)));
        }