Beispiel #1
0
        // Token: 0x06001507 RID: 5383 RVA: 0x00061514 File Offset: 0x0005F714
        protected bool smethod_3850(object obje_0, Class_349 arg_0, object obje_1, Class_353 arg_1, string str_0, Exception arg_2)
        {
            Class_446 class_ = this.lmethod_3848(obje_0, obje_1, str_0, arg_2);

            if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Error && !class_.prop_0)
            {
                class_.prop_0 = true;
                string text = this.field_2 ? "Error serializing" : "Error deserializing";
                if (arg_0 != null)
                {
                    text = text + " " + arg_0.prop_0;
                }
                text = text + ". " + arg_2.Message;
                if (!(arg_2 is Class_318))
                {
                    text = Class_326.FormatMessage(arg_1, str_0, text);
                }
                this.field_4.gmethod_2303(TraceLevel.Error, text, arg_2);
            }
            if (arg_0 != null && obje_0 != null)
            {
                arg_0.kmethod_2347(obje_0, this.field_3.prop_15, class_);
            }
            if (!class_.prop_5)
            {
                this.field_3.tmethod_3182(new Class_371(obje_0, class_));
            }
            return(class_.prop_5);
        }
Beispiel #2
0
 // Token: 0x06001550 RID: 5456 RVA: 0x00065914 File Offset: 0x00063B14
 private void dmethod_3916(Class_296 arg_0, Class_349 arg_1, object 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, "Finished serializing {0}".FormatWith(CultureInfo.InvariantCulture, arg_1.prop_0)), null);
     }
     arg_1.cmethod_2344(obje_0, this.field_3.field_14);
 }
Beispiel #3
0
        // Token: 0x06001555 RID: 5461 RVA: 0x00065E04 File Offset: 0x00064004
        private void xmethod_3921(Class_296 arg_0, Type arg_1)
        {
            string typeName = Class_514.GetTypeName(arg_1, this.field_3.field_1, this.field_3.field_13);

            if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Verbose)
            {
                this.field_4.gmethod_2303(TraceLevel.Verbose, Class_326.FormatMessage(null, arg_0.prop_4, "Writing type name '{0}' for {1}.".FormatWith(CultureInfo.InvariantCulture, typeName, arg_1)), null);
            }
            arg_0.cmethod_2014("$type", false);
            arg_0.kmethod_2037(typeName);
        }
Beispiel #4
0
        // Token: 0x06001554 RID: 5460 RVA: 0x00065D94 File Offset: 0x00063F94
        private void smethod_3920(Class_296 arg_0, Type arg_1, object obje_0)
        {
            string text = this.tmethod_3912(arg_0, obje_0);

            if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Verbose)
            {
                this.field_4.gmethod_2303(TraceLevel.Verbose, Class_326.FormatMessage(null, arg_0.prop_4, "Writing object reference Id '{0}' for {1}.".FormatWith(CultureInfo.InvariantCulture, text, arg_1)), null);
            }
            arg_0.cmethod_2014("$id", false);
            arg_0.kmethod_2037(text);
        }
Beispiel #5
0
        // Token: 0x0600154B RID: 5451 RVA: 0x00065714 File Offset: 0x00063914
        private void xmethod_3911(Class_296 arg_0, object obje_0)
        {
            string text = this.tmethod_3912(arg_0, 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, "Writing object reference to Id '{0}' for {1}.".FormatWith(CultureInfo.InvariantCulture, text, obje_0.GetType())), null);
            }
            arg_0.kmethod_2007();
            arg_0.cmethod_2014("$ref", false);
            arg_0.kmethod_2037(text);
            arg_0.lmethod_2008();
        }
Beispiel #6
0
        // Token: 0x06001566 RID: 5478 RVA: 0x00066CC8 File Offset: 0x00064EC8
        private bool lmethod_3938(Class_296 arg_0, Class_454 arg_1, object obje_0)
        {
            if (arg_1.prop_23 == null)
            {
                return(true);
            }
            bool flag = arg_1.prop_23(obje_0);

            if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Verbose)
            {
                this.field_4.gmethod_2303(TraceLevel.Verbose, Class_326.FormatMessage(null, arg_0.prop_4, "IsSpecified result for property '{0}' on {1}: {2}".FormatWith(CultureInfo.InvariantCulture, arg_1.prop_1, arg_1.prop_2, flag)), null);
            }
            return(flag);
        }
Beispiel #7
0
        // Token: 0x0600154A RID: 5450 RVA: 0x00065584 File Offset: 0x00063784
        private bool smethod_3910(Class_296 arg_0, object obje_0, Class_454 arg_1, Class_349 arg_2, Class_350 arg_3, Class_454 arg_4)
        {
            if (obje_0 == null || arg_2.field_5 == Class_448.Primitive || arg_2.field_5 == Class_448.String)
            {
                return(true);
            }
            Class_458?class_ = null;

            if (arg_1 != null)
            {
                class_ = arg_1.prop_19;
            }
            if (class_ == null && arg_4 != null)
            {
                class_ = arg_4.prop_28;
            }
            if (class_ == null && arg_3 != null)
            {
                class_ = arg_3.prop_4;
            }
            if (this.field_2.IndexOf(obje_0) != -1)
            {
                string text = "Self referencing loop detected";
                if (arg_1 != null)
                {
                    text += " for property '{0}'".FormatWith(CultureInfo.InvariantCulture, arg_1.prop_1);
                }
                text += " with type '{0}'.".FormatWith(CultureInfo.InvariantCulture, obje_0.GetType());
                switch (class_.GetValueOrDefault(this.field_3.field_3))
                {
                case Class_458.Error:
                    throw Class_417.gmethod_3103(null, arg_0.prop_3, text, null);

                case Class_458.Ignore:
                    if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Verbose)
                    {
                        this.field_4.gmethod_2303(TraceLevel.Verbose, Class_326.FormatMessage(null, arg_0.prop_4, text + ". Skipping serializing self referenced value."), null);
                    }
                    return(false);

                case Class_458.Serialize:
                    if (this.field_4 != null && this.field_4.prop_0 >= TraceLevel.Verbose)
                    {
                        this.field_4.gmethod_2303(TraceLevel.Verbose, Class_326.FormatMessage(null, arg_0.prop_4, text + ". Serializing self referenced value."), null);
                    }
                    return(true);
                }
            }
            return(true);
        }
Beispiel #8
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);
 }