// 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); }
// Token: 0x06001182 RID: 4482 RVA: 0x000563F4 File Offset: 0x000545F4 private static void gmethod_3163(Class_418 arg_0, Class_380 arg_1) { if (!Class_510.IsNullOrEmpty <Class_299>(arg_1.prop_5)) { for (int i = 0; i < arg_1.prop_5.Count; i++) { arg_0.prop_13.Insert(i, arg_1.prop_5[i]); } } if (arg_1.field_44 != null) { arg_0.prop_3 = arg_1.prop_7; } if (arg_1.field_45 != null) { arg_0.prop_12 = arg_1.prop_8; } if (arg_1.field_35 != null) { arg_0.prop_4 = arg_1.prop_9; } if (arg_1.field_37 != null) { arg_0.prop_5 = arg_1.prop_6; } if (arg_1.field_41 != null) { arg_0.prop_6 = arg_1.prop_0; } if (arg_1.field_40 != null) { arg_0.prop_7 = arg_1.prop_1; } if (arg_1.field_39 != null) { arg_0.prop_10 = arg_1.prop_2; } if (arg_1.field_38 != null) { arg_0.prop_8 = arg_1.prop_3; } if (arg_1.field_36 != null) { arg_0.prop_9 = arg_1.prop_4; } if (arg_1.field_43 != null) { arg_0.prop_11 = arg_1.prop_10; } if (arg_1.field_42 != null) { arg_0.prop_15 = arg_1.prop_16; } if (arg_1.field_30 != null) { arg_0.field_26 = arg_1.field_30; } if (arg_1.prop_15 != null) { arg_0.Error += arg_1.prop_15; } if (arg_1.prop_11 != null) { arg_0.prop_14 = arg_1.prop_11; } if (arg_1.prop_12 != null) { arg_0.prop_0 = arg_1.prop_12; } if (arg_1.prop_13 != null) { arg_0.prop_2 = arg_1.prop_13; } if (arg_1.prop_14 != null) { arg_0.prop_1 = arg_1.prop_14; } if (arg_1.field_22 != null) { arg_0.field_16 = arg_1.field_22; } if (arg_1.field_23 != null) { arg_0.field_17 = arg_1.field_23; } if (arg_1.field_24 != null) { arg_0.field_18 = arg_1.field_24; } if (arg_1.field_25 != null) { arg_0.field_19 = arg_1.field_25; } if (arg_1.field_34) { arg_0.field_27 = arg_1.field_33; arg_0.field_28 = arg_1.field_34; } if (arg_1.field_26 != null) { arg_0.field_20 = arg_1.field_26; } if (arg_1.field_27 != null) { arg_0.field_21 = arg_1.field_27; } if (arg_1.field_28 != null) { arg_0.field_22 = arg_1.field_28; } if (arg_1.field_29 != null) { arg_0.field_23 = arg_1.field_29; } if (arg_1.field_32) { arg_0.field_24 = arg_1.field_31; arg_0.field_25 = arg_1.field_32; } }