예제 #1
0
 // Token: 0x06001559 RID: 5465 RVA: 0x00065E88 File Offset: 0x00064088
 private void vmethod_3925(Class_296 arg_0, Class_299 arg_1, object obje_0, Class_349 arg_2, Class_350 arg_3, Class_454 arg_4)
 {
     if (this.lmethod_3908(obje_0, null, arg_2, arg_3, arg_4))
     {
         this.xmethod_3911(arg_0, obje_0);
         return;
     }
     if (!this.smethod_3910(arg_0, obje_0, null, arg_2, arg_3, arg_4))
     {
         return;
     }
     this.field_2.Add(obje_0);
     if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Info)
     {
         this.field_4.gmethod_2303(TraceLevel.Info, Class_326.FormatMessage(null, arg_0.prop_4, "Started serializing {0} with converter {1}.".FormatWith(CultureInfo.InvariantCulture, obje_0.GetType(), arg_1.GetType())), null);
     }
     arg_1.tmethod_2132(arg_0, obje_0, this.gmethod_3903());
     if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Info)
     {
         this.field_4.gmethod_2303(TraceLevel.Info, Class_326.FormatMessage(null, arg_0.prop_4, "Finished serializing {0} with converter {1}.".FormatWith(CultureInfo.InvariantCulture, obje_0.GetType(), arg_1.GetType())), null);
     }
     this.field_2.RemoveAt(this.field_2.Count - 1);
 }
예제 #2
0
        // Token: 0x06000E7C RID: 3708 RVA: 0x0004CCD0 File Offset: 0x0004AED0
        public virtual void cmethod_2604(Class_296 arg_0, params Class_299[] arg_1)
        {
            if (arg_1 != null && arg_1.Length > 0 && this.field_1 != null)
            {
                Class_299 class_ = Class_418.xmethod_3181(arg_1, this.field_1.GetType());
                if (class_ != null && class_.prop_1)
                {
                    class_.tmethod_2132(arg_0, this.field_1, Class_418.xmethod_3161());
                    return;
                }
            }
            switch (this.field_0)
            {
            case Class_428.Comment:
                arg_0.vmethod_2075((this.field_1 != null) ? this.field_1.ToString() : null);
                return;

            case Class_428.Integer:
                if (this.field_1 is BigInteger)
                {
                    arg_0.cmethod_2074((BigInteger)this.field_1);
                    return;
                }
                arg_0.smethod_2040(Convert.ToInt64(this.field_1, CultureInfo.InvariantCulture));
                return;

            case Class_428.Float:
                if (this.field_1 is decimal)
                {
                    arg_0.smethod_2050((decimal)this.field_1);
                    return;
                }
                if (this.field_1 is double)
                {
                    arg_0.gmethod_2043((double)this.field_1);
                    return;
                }
                if (this.field_1 is float)
                {
                    arg_0.tmethod_2042((float)this.field_1);
                    return;
                }
                arg_0.gmethod_2043(Convert.ToDouble(this.field_1, CultureInfo.InvariantCulture));
                return;

            case Class_428.String:
                arg_0.kmethod_2037((this.field_1 != null) ? this.field_1.ToString() : null);
                return;

            case Class_428.Boolean:
                arg_0.cmethod_2044(Convert.ToBoolean(this.field_1, CultureInfo.InvariantCulture));
                return;

            case Class_428.Null:
                arg_0.gmethod_2033();
                return;

            case Class_428.Undefined:
                arg_0.cmethod_2034();
                return;

            case Class_428.Date:
                if (this.field_1 is DateTimeOffset)
                {
                    arg_0.tmethod_2052((DateTimeOffset)this.field_1);
                    return;
                }
                arg_0.xmethod_2051(Convert.ToDateTime(this.field_1, CultureInfo.InvariantCulture));
                return;

            case Class_428.Raw:
                arg_0.dmethod_2036((this.field_1 != null) ? this.field_1.ToString() : null);
                return;

            case Class_428.Bytes:
                arg_0.tmethod_2072((byte[])this.field_1);
                return;

            case Class_428.Guid:
            case Class_428.Uri:
            case Class_428.TimeSpan:
                arg_0.kmethod_2037((this.field_1 != null) ? this.field_1.ToString() : null);
                return;

            default:
                throw Class_513.CreateArgumentOutOfRangeException("TokenType", this.field_0, "Unexpected token type.");
            }
        }