示例#1
0
        // Token: 0x06000C03 RID: 3075 RVA: 0x00042F80 File Offset: 0x00041180
        public virtual void smethod_2160(Class_296 arg_0, object obje_0, Class_418 arg_1)
        {
            Class_441 class_ = arg_1.prop_14 as Class_441;
            Type      type   = obje_0.GetType();
            Class_489 <object, object> getUnionFields = Class_484.GetUnionFields;
            object target = null;

            object[] array = new object[3];
            array[0] = obje_0;
            array[1] = type;
            object arg  = getUnionFields(target, array);
            object arg2 = Class_484.GetUnionCaseInfo(arg);
            object obj  = Class_484.GetUnionCaseFields(arg);
            object obj2 = Class_484.GetUnionCaseInfoName(arg2);

            object[] array2 = obj as object[];
            arg_0.kmethod_2007();
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Case") : "Case");
            arg_0.kmethod_2037((string)obj2);
            if (array2 != null && array2.Length > 0)
            {
                arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Fields") : "Fields");
                arg_1.kmethod_3177(arg_0, obj);
            }
            arg_0.lmethod_2008();
        }
示例#2
0
        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);
        }
示例#3
0
        // Token: 0x06000C08 RID: 3080 RVA: 0x00043390 File Offset: 0x00041590
        public virtual void cmethod_2164(Class_296 arg_0, object obje_0, Class_418 arg_1)
        {
            Class_306.lmethod_2168(obje_0.GetType());
            Class_441 class_ = arg_1.prop_14 as Class_441;
            string    str_   = (string)Class_306.field_4.tmethod_4062(obje_0, "Key");
            object    obj    = Class_306.field_4.tmethod_4062(obje_0, "Value");
            Type      type   = (obj != null) ? obj.GetType() : null;

            arg_0.kmethod_2007();
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Key") : "Key");
            arg_0.kmethod_2037(str_);
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Type") : "Type");
            arg_0.kmethod_2037((type != null) ? type.FullName : null);
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Value") : "Value");
            if (type != null)
            {
                string str_2;
                if (Class_467.gmethod_3913(obj, type, out str_2))
                {
                    arg_0.kmethod_2037(str_2);
                }
                else
                {
                    arg_0.cmethod_2074(obj);
                }
            }
            else
            {
                arg_0.gmethod_2033();
            }
            arg_0.lmethod_2008();
        }
示例#4
0
        // Token: 0x06001551 RID: 5457 RVA: 0x00065980 File Offset: 0x00063B80
        private void kmethod_3917(Class_296 arg_0, object obje_0, Class_464 arg_1, Class_454 arg_2, Class_350 arg_3, Class_454 arg_4)
        {
            this.vmethod_3915(arg_0, arg_1, obje_0);
            this.field_2.Add(obje_0);
            this.pmethod_3919(arg_0, obje_0, arg_1, arg_2, arg_3, arg_4);
            int sayıInt_ = arg_0.prop_1;

            for (int i = 0; i < arg_1.prop_2.Count; i++)
            {
                Class_454 class_ = arg_1.prop_2[i];
                try
                {
                    Class_349 arg_5;
                    object    obje_;
                    if (this.lmethod_3918(arg_0, obje_0, arg_1, arg_2, class_, out arg_5, out obje_))
                    {
                        class_.xmethod_3701(arg_0);
                        this.dmethod_3906(arg_0, obje_, arg_5, class_, arg_1, arg_2);
                    }
                }
                catch (Exception arg_6)
                {
                    if (!base.smethod_3850(obje_0, arg_1, class_.prop_1, null, arg_0.prop_3, arg_6))
                    {
                        throw;
                    }
                    this.dmethod_3936(arg_0, sayıInt_);
                }
            }
            if (arg_1.prop_10 != null)
            {
                IEnumerable <KeyValuePair <object, object> > enumerable = arg_1.prop_10(obje_0);
                if (enumerable != null)
                {
                    foreach (KeyValuePair <object, object> keyValuePair in enumerable)
                    {
                        Class_349 arg_7   = this.cmethod_3904(keyValuePair.Key);
                        Class_349 class_2 = this.cmethod_3904(keyValuePair.Value);
                        bool      flag;
                        string    str_ = this.vmethod_3935(arg_0, keyValuePair.Key, arg_7, out flag);
                        if (this.lmethod_3908(keyValuePair.Value, null, class_2, arg_1, arg_2))
                        {
                            arg_0.gmethod_2013(str_);
                            this.xmethod_3911(arg_0, keyValuePair.Value);
                        }
                        else if (this.smethod_3910(arg_0, keyValuePair.Value, null, class_2, arg_1, arg_2))
                        {
                            arg_0.gmethod_2013(str_);
                            this.dmethod_3906(arg_0, keyValuePair.Value, class_2, null, arg_1, arg_2);
                        }
                    }
                }
            }
            arg_0.lmethod_2008();
            this.field_2.RemoveAt(this.field_2.Count - 1);
            this.dmethod_3916(arg_0, arg_1, obje_0);
        }
示例#5
0
        // Token: 0x06000C25 RID: 3109 RVA: 0x00043BDC File Offset: 0x00041DDC
        private void lmethod_2188(Class_296 arg_0, Regex arg_1, Class_418 arg_2)
        {
            Class_441 class_ = arg_2.prop_14 as Class_441;

            arg_0.kmethod_2007();
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Pattern") : "Pattern");
            arg_0.kmethod_2037(arg_1.ToString());
            arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590("Options") : "Options");
            arg_2.kmethod_3177(arg_0, arg_1.Options);
            arg_0.lmethod_2008();
        }
示例#6
0
        // Token: 0x06000C18 RID: 3096 RVA: 0x0004381C File Offset: 0x00041A1C
        public virtual void lmethod_2178(Class_296 arg_0, object obje_0, Class_418 arg_1)
        {
            Class_491 class_  = Class_308.field_2.Get(obje_0.GetType());
            Class_441 class_2 = arg_1.prop_14 as Class_441;

            arg_0.kmethod_2007();
            arg_0.gmethod_2013((class_2 != null) ? class_2.smethod_3590("Key") : "Key");
            arg_1.vmethod_3175(arg_0, class_.tmethod_4062(obje_0, "Key"), class_.cmethod_4064("Key"));
            arg_0.gmethod_2013((class_2 != null) ? class_2.smethod_3590("Value") : "Value");
            arg_1.vmethod_3175(arg_0, class_.tmethod_4062(obje_0, "Value"), class_.cmethod_4064("Value"));
            arg_0.lmethod_2008();
        }
示例#7
0
 // Token: 0x06001384 RID: 4996 RVA: 0x0005BFDC File Offset: 0x0005A1DC
 private void cmethod_3534(Class_296 arg_0, string str_0, IDictionary <string, Class_459> arg_1)
 {
     if (arg_1 != null)
     {
         arg_0.gmethod_2013(str_0);
         arg_0.kmethod_2007();
         foreach (KeyValuePair <string, Class_459> keyValuePair in arg_1)
         {
             arg_0.gmethod_2013(keyValuePair.Key);
             this.tmethod_3532(keyValuePair.Value);
         }
         arg_0.lmethod_2008();
     }
 }
示例#8
0
 // Token: 0x06001387 RID: 4999 RVA: 0x0005C240 File Offset: 0x0005A440
 private void kmethod_3537(Class_296 arg_0, string str_0, object obje_0)
 {
     if (obje_0 != null)
     {
         arg_0.gmethod_2013(str_0);
         arg_0.cmethod_2074(obje_0);
     }
 }
示例#9
0
 // Token: 0x06001461 RID: 5217 RVA: 0x0005F0A8 File Offset: 0x0005D2A8
 internal void xmethod_3701(Class_296 arg_0)
 {
     if (this.field_5)
     {
         arg_0.cmethod_2014(this.prop_1, false);
         return;
     }
     arg_0.gmethod_2013(this.prop_1);
 }
示例#10
0
        // Token: 0x060012FF RID: 4863 RVA: 0x0005AAAC File Offset: 0x00058CAC
        public virtual void vmethod_3445(Class_296 arg_0, params Class_299[] arg_1)
        {
            arg_0.gmethod_2013(this.field_1);
            Class_361 class_ = this.prop_2;

            if (class_ != null)
            {
                class_.cmethod_2474(arg_0, arg_1);
                return;
            }
            arg_0.gmethod_2033();
        }
示例#11
0
        // Token: 0x06000BEF RID: 3055 RVA: 0x000428A4 File Offset: 0x00040AA4
        public virtual void cmethod_2144(Class_296 arg_0, object obje_0, Class_418 arg_1)
        {
            DataSet   dataSet = (DataSet)obje_0;
            Class_441 class_  = arg_1.prop_14 as Class_441;
            Class_302 class_2 = new Class_302();

            arg_0.kmethod_2007();
            foreach (object obj in dataSet.Tables)
            {
                DataTable dataTable = (DataTable)obj;
                arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590(dataTable.TableName) : dataTable.TableName);
                class_2.tmethod_2132(arg_0, dataTable, arg_1);
            }
            arg_0.lmethod_2008();
        }
示例#12
0
        // Token: 0x0600102F RID: 4143 RVA: 0x00050DF4 File Offset: 0x0004EFF4
        private void dmethod_2966(Class_296 arg_0, Class_387 arg_1, XmlNamespaceManager arg_2, bool bool_0)
        {
            Dictionary <string, List <Class_387> > dictionary = new Dictionary <string, List <Class_387> >();

            for (int i = 0; i < arg_1.prop_2.Count; i++)
            {
                Class_387        class_ = arg_1.prop_2[i];
                string           key    = this.cmethod_2964(class_, arg_2);
                List <Class_387> list;
                if (!dictionary.TryGetValue(key, out list))
                {
                    list = new List <Class_387>();
                    dictionary.Add(key, list);
                }
                list.Add(class_);
            }
            foreach (KeyValuePair <string, List <Class_387> > keyValuePair in dictionary)
            {
                List <Class_387> value = keyValuePair.Value;
                if (value.Count == 1 && !this.vmethod_2965(value[0]))
                {
                    this.kmethod_2967(arg_0, value[0], arg_2, bool_0);
                }
                else
                {
                    string key2 = keyValuePair.Key;
                    if (bool_0)
                    {
                        arg_0.gmethod_2013(key2);
                    }
                    arg_0.pmethod_2009();
                    for (int j = 0; j < value.Count; j++)
                    {
                        this.kmethod_2967(arg_0, value[j], arg_2, false);
                    }
                    arg_0.smethod_2010();
                }
            }
        }
示例#13
0
        // Token: 0x06000BF4 RID: 3060 RVA: 0x00042A2C File Offset: 0x00040C2C
        public virtual void lmethod_2148(Class_296 arg_0, object obje_0, Class_418 arg_1)
        {
            DataTable dataTable = (DataTable)obje_0;
            Class_441 class_    = arg_1.prop_14 as Class_441;

            arg_0.pmethod_2009();
            foreach (object obj in dataTable.Rows)
            {
                DataRow dataRow = (DataRow)obj;
                arg_0.kmethod_2007();
                foreach (object obj2 in dataRow.Table.Columns)
                {
                    DataColumn dataColumn = (DataColumn)obj2;
                    if (arg_1.prop_8 != Class_457.Ignore || (dataRow[dataColumn] != null && dataRow[dataColumn] != DBNull.Value))
                    {
                        arg_0.gmethod_2013((class_ != null) ? class_.smethod_3590(dataColumn.ColumnName) : dataColumn.ColumnName);
                        arg_1.kmethod_3177(arg_0, dataRow[dataColumn]);
                    }
                }
                arg_0.lmethod_2008();
            }
            arg_0.smethod_2010();
        }
示例#14
0
        // Token: 0x06001386 RID: 4998 RVA: 0x0005C14C File Offset: 0x0005A34C
        private void dmethod_3536(string str_0, Class_296 arg_0, Class_463 arg_1)
        {
            IList <Class_463> list;

            if (Enum.IsDefined(typeof(Class_463), arg_1))
            {
                list = new List <Class_463>
                {
                    arg_1
                };
            }
            else
            {
                IEnumerable <Class_463> flagsValues = Class_505.GetFlagsValues <Class_463>(arg_1);
                if (Class_436.field_2 == null)
                {
                    Class_436.field_2 = new Func <Class_463, bool>(Class_436.lmethod_3538);
                }
                list = flagsValues.Where(Class_436.field_2).ToList <Class_463>();
            }
            if (list.Count == 0)
            {
                return;
            }
            arg_0.gmethod_2013(str_0);
            if (list.Count == 1)
            {
                arg_0.kmethod_2037(Class_460.gmethod_3803(list[0]));
                return;
            }
            arg_0.pmethod_2009();
            foreach (Class_463 arg_2 in list)
            {
                arg_0.kmethod_2037(Class_460.gmethod_3803(arg_2));
            }
            arg_0.smethod_2010();
        }
示例#15
0
        // Token: 0x06001030 RID: 4144 RVA: 0x00050F3C File Offset: 0x0004F13C
        private void kmethod_2967(Class_296 arg_0, Class_387 arg_1, XmlNamespaceManager arg_2, bool bool_0)
        {
            Func <Class_387, bool> func = null;

            Class_407.NClass_0 nclass_ = new Class_407.NClass_0();
            nclass_.field_1 = arg_1;
            switch (nclass_.field_1.prop_0)
            {
            case XmlNodeType.Element:
                if (this.vmethod_2965(nclass_.field_1))
                {
                    IEnumerable <Class_387> source = nclass_.field_1.prop_2;
                    if (func == null)
                    {
                        func = new Func <Class_387, bool>(nclass_.nmethod_1);
                    }
                    if (source.All(func) && nclass_.field_1.prop_2.Count > 0)
                    {
                        this.dmethod_2966(arg_0, nclass_.field_1, arg_2, false);
                        return;
                    }
                }
                arg_2.PushScope();
                foreach (Class_387 class_ in nclass_.field_1.prop_3)
                {
                    if (class_.prop_6 == "http://www.w3.org/2000/xmlns/")
                    {
                        string prefix = (class_.prop_1 != "xmlns") ? class_.prop_1 : string.Empty;
                        string uri    = class_.prop_5;
                        arg_2.AddNamespace(prefix, uri);
                    }
                }
                if (bool_0)
                {
                    arg_0.gmethod_2013(this.cmethod_2964(nclass_.field_1, arg_2));
                }
                if (!this.smethod_2980(nclass_.field_1.prop_3).Any <Class_387>() && nclass_.field_1.prop_2.Count == 1 && nclass_.field_1.prop_2[0].prop_0 == XmlNodeType.Text)
                {
                    arg_0.kmethod_2037(nclass_.field_1.prop_2[0].prop_5);
                }
                else if (nclass_.field_1.prop_2.Count == 0 && Class_510.IsNullOrEmpty <Class_387>(nclass_.field_1.prop_3))
                {
                    Class_391 class_2 = (Class_391)nclass_.field_1;
                    if (class_2.prop_0)
                    {
                        arg_0.gmethod_2033();
                    }
                    else
                    {
                        arg_0.kmethod_2037(string.Empty);
                    }
                }
                else
                {
                    arg_0.kmethod_2007();
                    for (int i = 0; i < nclass_.field_1.prop_3.Count; i++)
                    {
                        this.kmethod_2967(arg_0, nclass_.field_1.prop_3[i], arg_2, true);
                    }
                    this.dmethod_2966(arg_0, nclass_.field_1, arg_2, true);
                    arg_0.lmethod_2008();
                }
                arg_2.PopScope();
                return;

            case XmlNodeType.Attribute:
            case XmlNodeType.Text:
            case XmlNodeType.CDATA:
            case XmlNodeType.ProcessingInstruction:
            case XmlNodeType.Whitespace:
            case XmlNodeType.SignificantWhitespace:
                if (nclass_.field_1.prop_6 == "http://www.w3.org/2000/xmlns/" && nclass_.field_1.prop_5 == "http://james.newtonking.com/projects/json")
                {
                    return;
                }
                if (nclass_.field_1.prop_6 == "http://james.newtonking.com/projects/json" && nclass_.field_1.prop_1 == "Array")
                {
                    return;
                }
                if (bool_0)
                {
                    arg_0.gmethod_2013(this.cmethod_2964(nclass_.field_1, arg_2));
                }
                arg_0.kmethod_2037(nclass_.field_1.prop_5);
                return;

            case XmlNodeType.Comment:
                if (bool_0)
                {
                    arg_0.vmethod_2075(nclass_.field_1.prop_5);
                    return;
                }
                return;

            case XmlNodeType.Document:
            case XmlNodeType.DocumentFragment:
                this.dmethod_2966(arg_0, nclass_.field_1, arg_2, bool_0);
                return;

            case XmlNodeType.DocumentType:
            {
                Class_395 class_3 = (Class_395)nclass_.field_1;
                arg_0.gmethod_2013(this.cmethod_2964(nclass_.field_1, arg_2));
                arg_0.kmethod_2007();
                if (!string.IsNullOrEmpty(class_3.prop_0))
                {
                    arg_0.gmethod_2013("@name");
                    arg_0.kmethod_2037(class_3.prop_0);
                }
                if (!string.IsNullOrEmpty(class_3.prop_2))
                {
                    arg_0.gmethod_2013("@public");
                    arg_0.kmethod_2037(class_3.prop_2);
                }
                if (!string.IsNullOrEmpty(class_3.prop_1))
                {
                    arg_0.gmethod_2013("@system");
                    arg_0.kmethod_2037(class_3.prop_1);
                }
                if (!string.IsNullOrEmpty(class_3.prop_3))
                {
                    arg_0.gmethod_2013("@internalSubset");
                    arg_0.kmethod_2037(class_3.prop_3);
                }
                arg_0.lmethod_2008();
                return;
            }

            case XmlNodeType.XmlDeclaration:
            {
                Class_393 class_4 = (Class_393)nclass_.field_1;
                arg_0.gmethod_2013(this.cmethod_2964(nclass_.field_1, arg_2));
                arg_0.kmethod_2007();
                if (!string.IsNullOrEmpty(class_4.prop_0))
                {
                    arg_0.gmethod_2013("@version");
                    arg_0.kmethod_2037(class_4.prop_0);
                }
                if (!string.IsNullOrEmpty(class_4.prop_1))
                {
                    arg_0.gmethod_2013("@encoding");
                    arg_0.kmethod_2037(class_4.prop_1);
                }
                if (!string.IsNullOrEmpty(class_4.prop_2))
                {
                    arg_0.gmethod_2013("@standalone");
                    arg_0.kmethod_2037(class_4.prop_2);
                }
                arg_0.lmethod_2008();
                return;
            }
            }
            throw new Class_417("Unexpected XmlNodeType when serializing nodes: " + nclass_.field_1.prop_0);
        }
示例#16
0
        // Token: 0x0600155F RID: 5471 RVA: 0x00066510 File Offset: 0x00064710
        private void xmethod_3931(Class_296 arg_0, IDynamicMetaObjectProvider arg_1, Class_365 arg_2, Class_454 arg_3, Class_350 arg_4, Class_454 arg_5)
        {
            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);
            int sayıInt_ = arg_0.prop_1;

            for (int i = 0; i < arg_2.prop_0.Count; i++)
            {
                Class_454 class_ = arg_2.prop_0[i];
                if (class_.prop_13)
                {
                    try
                    {
                        Class_349 arg_6;
                        object    obje_;
                        if (this.lmethod_3918(arg_0, arg_1, arg_2, arg_3, class_, out arg_6, out obje_))
                        {
                            class_.xmethod_3701(arg_0);
                            this.dmethod_3906(arg_0, obje_, arg_6, class_, arg_2, arg_3);
                        }
                    }
                    catch (Exception arg_7)
                    {
                        if (!base.smethod_3850(arg_1, arg_2, class_.prop_1, null, arg_0.prop_3, arg_7))
                        {
                            throw;
                        }
                        this.dmethod_3936(arg_0, sayıInt_);
                    }
                }
            }
            foreach (string text in arg_1.GetDynamicMemberNames())
            {
                object obje_2;
                if (arg_2.xmethod_2641(arg_1, text, out obje_2))
                {
                    try
                    {
                        Class_349 class_2 = this.cmethod_3904(obje_2);
                        if (this.tmethod_3932(obje_2))
                        {
                            if (this.smethod_3910(arg_0, obje_2, null, class_2, arg_2, arg_3))
                            {
                                string str_ = (arg_2.prop_1 != null) ? arg_2.prop_1(text) : text;
                                arg_0.gmethod_2013(str_);
                                this.dmethod_3906(arg_0, obje_2, class_2, null, arg_2, arg_3);
                            }
                        }
                    }
                    catch (Exception arg_8)
                    {
                        if (!base.smethod_3850(arg_1, arg_2, text, null, arg_0.prop_3, arg_8))
                        {
                            throw;
                        }
                        this.dmethod_3936(arg_0, sayıInt_);
                    }
                }
            }
            arg_0.lmethod_2008();
            this.field_2.RemoveAt(this.field_2.Count - 1);
            this.dmethod_3916(arg_0, arg_2, arg_1);
        }