private void smethod_3930(Class_296 arg_0, ISerializable arg_1, Class_367 arg_2, Class_454 arg_3, Class_350 arg_4, Class_454 arg_5)
        {
            if (!Class_470.FullyTrusted)
            {
                string text = "Type '{0}' implements ISerializable but cannot be serialized using the ISerializable interface because the current application is not fully trusted and ISerializable can expose secure data." + Environment.NewLine + "To fix this error either change the environment to be fully trusted, change the application to not deserialize the type, add JsonObjectAttribute to the type or change the JsonSerializer setting ContractResolver to use a new DefaultContractResolver with IgnoreSerializableInterface set to true." + Environment.NewLine;
                text = text.FormatWith(CultureInfo.InvariantCulture, arg_1.GetType());
                throw Class_417.gmethod_3103(null, arg_0.prop_3, text, null);
            }
            this.vmethod_3915(arg_0, arg_2, arg_1);
            this.field_2.Add(arg_1);
            this.pmethod_3919(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5);
            SerializationInfo serializationInfo = new SerializationInfo(arg_2.prop_0, new FormatterConverter());

            arg_1.GetObjectData(serializationInfo, this.field_3.field_14);
            foreach (SerializationEntry serializationEntry in serializationInfo)
            {
                Class_349 class_ = this.cmethod_3904(serializationEntry.Value);
                if (this.lmethod_3908(serializationEntry.Value, null, class_, arg_2, arg_3))
                {
                    arg_0.gmethod_2013(serializationEntry.Name);
                    this.xmethod_3911(arg_0, serializationEntry.Value);
                }
                else if (this.smethod_3910(arg_0, serializationEntry.Value, null, class_, arg_2, arg_3))
                {
                    arg_0.gmethod_2013(serializationEntry.Name);
                    this.dmethod_3906(arg_0, serializationEntry.Value, class_, null, arg_2, arg_3);
                }
            }
            arg_0.lmethod_2008();
            this.field_2.RemoveAt(this.field_2.Count - 1);
            this.dmethod_3916(arg_0, arg_2, arg_1);
        }
        // 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);
        }
        // Token: 0x0600154C RID: 5452 RVA: 0x00065794 File Offset: 0x00063994
        private string tmethod_3912(Class_296 arg_0, object obje_0)
        {
            string result;

            try
            {
                string text = this.field_3.pmethod_3179().tmethod_2682(this, obje_0);
                result = text;
            }
            catch (Exception arg_)
            {
                throw Class_417.gmethod_3103(null, arg_0.prop_3, "Error writing object reference for '{0}'.".FormatWith(CultureInfo.InvariantCulture, obje_0.GetType()), arg_);
            }
            return(result);
        }
 // Token: 0x06001552 RID: 5458 RVA: 0x00065B7C File Offset: 0x00063D7C
 private bool lmethod_3918(Class_296 arg_0, object obje_0, Class_350 arg_1, Class_454 arg_2, Class_454 arg_3, out Class_349 arg_4, out object arg_5)
 {
     if (!arg_3.prop_10 && arg_3.prop_11 && this.kmethod_3937(arg_0, arg_3, obje_0) && this.lmethod_3938(arg_0, arg_3, obje_0))
     {
         if (arg_3.prop_0 == null)
         {
             arg_3.prop_0 = this.field_3.field_11.tmethod_3542(arg_3.prop_7);
         }
         arg_5 = arg_3.prop_5.pmethod_2309(obje_0);
         arg_4 = (arg_3.prop_0.field_7 ? arg_3.prop_0 : this.cmethod_3904(arg_5));
         if (this.pmethod_3909(arg_5, arg_3))
         {
             if (this.lmethod_3908(arg_5, arg_3, arg_4, arg_1, arg_2))
             {
                 arg_3.xmethod_3701(arg_0);
                 this.xmethod_3911(arg_0, arg_5);
                 return(false);
             }
             if (!this.smethod_3910(arg_0, arg_5, arg_3, arg_4, arg_1, arg_2))
             {
                 return(false);
             }
             if (arg_5 == null)
             {
                 Class_464 class_  = arg_1 as Class_464;
                 Class_364 class_2 = arg_3.field_0 ?? (((class_ != null) ? class_.prop_1 : null) ?? Class_364.Default);
                 if (class_2 == Class_364.Always)
                 {
                     throw Class_417.gmethod_3103(null, arg_0.prop_3, "Cannot write a null value for property '{0}'. Property requires a value.".FormatWith(CultureInfo.InvariantCulture, arg_3.prop_1), null);
                 }
             }
             return(true);
         }
     }
     arg_4 = null;
     arg_5 = null;
     return(false);
 }