public override void Close() { this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_9); this.class192_0 = null; this.class193_0 = null; base.Close(); }
public override void Close() { _delegate50 = method_9; _class1920 = null; _class1930 = null; base.Close(); }
private void method_10(JsonReader jsonReader_0, Interface11 interface11_0, string string_8, Interface10 interface10_0, XmlNamespaceManager xmlNamespaceManager_0) { Func <Interface12, bool> predicate = null; Class106 class2 = new Class106 { string_0 = string_8 }; string str = Class193.smethod_4(class2.string_0); Interface12 interface2 = this.method_14(class2.string_0, interface11_0, str, xmlNamespaceManager_0); interface10_0.imethod_0(interface2); int num = 0; while (jsonReader_0.Read()) { if (jsonReader_0.JsonToken_0 == JsonToken.EndArray) { break; } this.method_7(jsonReader_0, interface11_0, xmlNamespaceManager_0, class2.string_0, interface2); num++; } if (this.WriteArrayAttribute) { this.method_11(interface2, interface11_0); } if ((num == 1) && this.WriteArrayAttribute) { if (predicate == null) { predicate = new Func <Interface12, bool>(class2.method_0); } Interface12 interface3 = interface2.Prop_0.OfType <Interface12>().Single <Interface12>(predicate); this.method_11(interface3, interface11_0); } }
public static Class193 smethod_0() { if (class193_0 == null) { class193_0 = new Class193(); } return(class193_0); }
private JsonToken?method_16(JContainer jcontainer_0) { switch (jcontainer_0.Type) { case JTokenType.Object: return(13); case JTokenType.Array: return(14); case JTokenType.Constructor: return(15); case JTokenType.Property: return(null); } throw Class193.smethod_1("Type", jcontainer_0.Type, "Unexpected JContainer type."); }
private void method_7(bool bool_2) { base.method_1(); if ((this.int_1 & 8) != 0) { this.method_6(); } this.long_1 = 0L; if (bool_2 && (this.class192_0.vmethod_0() & 4294967295L) != this.class193_0.method_25() && this.class193_0.method_25() != -1L) { throw new ZipException("CRC mismatch"); } this.class192_0.vmethod_1(); if (this.int_0 == 8) { this.class196_0.method_0(); } this.class193_0 = null; }
private void method_8(JsonReader jsonReader_0, Interface11 interface11_0, Interface10 interface10_0, string string_8, XmlNamespaceManager xmlNamespaceManager_0) { if (string.IsNullOrEmpty(string_8)) { throw new JsonSerializationException("XmlNodeConverter cannot convert JSON with an empty property name to XML."); } Dictionary <string, string> dictionary = this.method_12(jsonReader_0, xmlNamespaceManager_0); string str = Class193.smethod_4(string_8); if (string_8.StartsWith("@")) { string str2 = string_8.Substring(1); string str3 = jsonReader_0.Object_0.ToString(); string str4 = Class193.smethod_4(str2); Interface10 interface2 = !string.IsNullOrEmpty(str4) ? interface11_0.imethod_11(str2, xmlNamespaceManager_0.LookupNamespace(str4), str3) : interface11_0.imethod_10(str2, str3); ((Interface12)interface10_0).imethod_1(interface2); } else { Interface12 interface3 = this.method_14(string_8, interface11_0, str, xmlNamespaceManager_0); interface10_0.imethod_0(interface3); foreach (KeyValuePair <string, string> pair in dictionary) { string str5 = Class193.smethod_4(pair.Key); Interface10 interface4 = !string.IsNullOrEmpty(str5) ? interface11_0.imethod_11(pair.Key, xmlNamespaceManager_0.LookupNamespace(str5), pair.Value) : interface11_0.imethod_10(pair.Key, pair.Value); interface3.imethod_1(interface4); } if ((((jsonReader_0.JsonToken_0 != JsonToken.String) && (jsonReader_0.JsonToken_0 != JsonToken.Integer)) && ((jsonReader_0.JsonToken_0 != JsonToken.Float) && (jsonReader_0.JsonToken_0 != JsonToken.Boolean))) && (jsonReader_0.JsonToken_0 != JsonToken.Date)) { if ((jsonReader_0.JsonToken_0 != JsonToken.Null) && (jsonReader_0.JsonToken_0 != JsonToken.EndObject)) { xmlNamespaceManager_0.PushScope(); this.method_15(jsonReader_0, interface11_0, xmlNamespaceManager_0, interface3); xmlNamespaceManager_0.PopScope(); } } else { interface3.imethod_0(interface11_0.imethod_2(this.method_9(jsonReader_0))); } } }
private void method_7(bool bool2) { method_1(); if ((_int1 & 8) != 0) { method_6(); } _long1 = 0L; if (bool2 && (_class1920.vmethod_0() & 4294967295L) != _class1930.method_25() && _class1930.method_25() != -1L) { throw new ZipException("CRC mismatch"); } _class1920.vmethod_1(); if (_int0 == 8) { Class1960.method_0(); } _class1930 = null; }
public Interface12 imethod_9(string string_0, string string_1) { return(new Class100(new XElement(XName.Get(Class193.smethod_5(string_0), string_1)))); }
internal void method_5(JsonReader jsonReader_0, int int_0, bool bool_1, bool bool_2) { do { switch (jsonReader_0.JsonToken_0) { case JsonToken.None: break; case JsonToken.StartObject: this.WriteStartObject(); break; case JsonToken.StartArray: this.WriteStartArray(); break; case JsonToken.StartConstructor: { string a = jsonReader_0.Object_0.ToString(); if (!bool_2 || !string.Equals(a, "Date", StringComparison.Ordinal)) { this.WriteStartConstructor(jsonReader_0.Object_0.ToString()); break; } this.method_6(jsonReader_0); break; } case JsonToken.PropertyName: this.WritePropertyName(jsonReader_0.Object_0.ToString()); break; case JsonToken.Comment: this.WriteComment((jsonReader_0.Object_0 != null) ? jsonReader_0.Object_0.ToString() : null); break; case JsonToken.Raw: this.WriteRawValue((jsonReader_0.Object_0 != null) ? jsonReader_0.Object_0.ToString() : null); break; case JsonToken.Integer: if (!(jsonReader_0.Object_0 is BigInteger)) { this.WriteValue(Convert.ToInt64(jsonReader_0.Object_0, CultureInfo.InvariantCulture)); break; } this.WriteValue((BigInteger)jsonReader_0.Object_0); break; case JsonToken.Float: { object obj2 = jsonReader_0.Object_0; if (!(obj2 is decimal)) { if (obj2 is double) { this.WriteValue((double)obj2); } else if (obj2 is float) { this.WriteValue((float)obj2); } else { this.WriteValue(Convert.ToDouble(obj2, CultureInfo.InvariantCulture)); } break; } this.WriteValue((decimal)obj2); break; } case JsonToken.String: this.WriteValue(jsonReader_0.Object_0.ToString()); break; case JsonToken.Boolean: this.WriteValue(Convert.ToBoolean(jsonReader_0.Object_0, CultureInfo.InvariantCulture)); break; case JsonToken.Null: this.WriteNull(); break; case JsonToken.Undefined: this.WriteUndefined(); break; case JsonToken.EndObject: this.WriteEndObject(); break; case JsonToken.EndArray: this.WriteEndArray(); break; case JsonToken.EndConstructor: this.WriteEndConstructor(); break; case JsonToken.Date: if (!(jsonReader_0.Object_0 is DateTimeOffset)) { this.WriteValue(Convert.ToDateTime(jsonReader_0.Object_0, CultureInfo.InvariantCulture)); break; } this.WriteValue((DateTimeOffset)jsonReader_0.Object_0); break; case JsonToken.Bytes: this.WriteValue((byte[])jsonReader_0.Object_0); break; default: throw Class193.smethod_1("TokenType", jsonReader_0.JsonToken_0, "Unexpected token type."); } }while ((((int_0 - 1) < (jsonReader_0.Int32_0 - (smethod_1(jsonReader_0.JsonToken_0) ? 1 : 0))) && bool_1) && jsonReader_0.Read()); }
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { bool flag; Type type = (flag = Class194.smethod_10(objectType)) ? Nullable.GetUnderlyingType(objectType) : objectType; if (reader.JsonToken_0 == JsonToken.Null) { if (!Class194.smethod_10(objectType)) { throw JsonSerializationException.smethod_1(reader, "Cannot convert null value to {0}.".smethod_0(CultureInfo.InvariantCulture, objectType)); } return(null); } try { if (reader.JsonToken_0 == JsonToken.String) { string str2; string str = reader.Object_0.ToString(); if ((str == string.Empty) && flag) { return(null); } Class179 <string, string> class2 = this.method_0(type); if (str.IndexOf(',') != -1) { string[] strArray = str.Split(new char[] { ',' }); for (int i = 0; i < strArray.Length; i++) { string str3 = strArray[i].Trim(); strArray[i] = smethod_0(class2, str3); } str2 = string.Join(", ", strArray); } else { str2 = smethod_0(class2, str); } return(Enum.Parse(type, str2, true)); } if (reader.JsonToken_0 == JsonToken.Integer) { return(Class181.smethod_10(reader.Object_0, CultureInfo.InvariantCulture, type)); } } catch (Exception exception) { throw JsonSerializationException.smethod_2(reader, "Error converting value {0} to type '{1}'.".smethod_1(CultureInfo.InvariantCulture, Class193.smethod_7(reader.Object_0), objectType), exception); } throw JsonSerializationException.smethod_1(reader, "Unexpected token when parsing enum. Expected String or Integer, got {0}.".smethod_0(CultureInfo.InvariantCulture, reader.JsonToken_0)); }
public Class193 method_5() { if (_class1920 == null) { throw new InvalidOperationException("Closed."); } if (_class1930 != null) { method_8(); } var num = Class2010.method_10(); if (num != 33639248 && num != 101010256 && num != 84233040 && num != 117853008) { if (num != 101075792) { if (num == 808471376 || num == 134695760) { num = Class2010.method_10(); } if (num != 67324752) { throw new ZipException("Wrong Local header signature: 0x" + string.Format("{0:X}", num)); } var int_ = (short)Class2010.method_9(); _int1 = Class2010.method_9(); _int0 = Class2010.method_9(); var num2 = (uint)Class2010.method_10(); var num3 = Class2010.method_10(); Long0 = Class2010.method_10(); _long1 = Class2010.method_10(); var num4 = Class2010.method_9(); var num5 = Class2010.method_9(); var flag = (_int1 & 1) == 1; var array = new byte[num4]; Class2010.method_5(array); var string_ = Class186.smethod_2(_int1, array); _class1930 = new Class193(string_, int_); _class1930.method_5(_int1); _class1930.method_28((Enum31)_int0); if ((_int1 & 8) == 0) { _class1930.method_26(num3 & 4294967295L); _class1930.method_22(_long1 & 4294967295L); _class1930.method_24(Long0 & 4294967295L); _class1930.method_3((byte)(num3 >> 24 & 255)); } else { if (num3 != 0) { _class1930.method_26(num3 & 4294967295L); } if (_long1 != 0L) { _class1930.method_22(_long1 & 4294967295L); } if (Long0 != 0L) { _class1930.method_24(Long0 & 4294967295L); } _class1930.method_3((byte)(num2 >> 8 & 255u)); } _class1930.method_18(num2); if (num5 > 0) { var array2 = new byte[num5]; Class2010.method_5(array2); _class1930.method_30(array2); } _class1930.method_31(true); if (_class1930.method_23() >= 0L) { Long0 = _class1930.method_23(); } if (_class1930.method_21() >= 0L) { _long1 = _class1930.method_21(); } if (_int0 == 0 && ((!flag && Long0 != _long1) || (flag && Long0 - 12L != _long1))) { throw new ZipException("Stored, but compressed != uncompressed"); } if (_class1930.method_34()) { _delegate50 = method_11; } else { _delegate50 = method_10; } return(_class1930); } } Close(); return(null); }
private void method_19(JToken jtoken_3) { switch (jtoken_3.Type) { case JTokenType.Object: base.SetToken(JsonToken.StartObject); return; case JTokenType.Array: base.SetToken(JsonToken.StartArray); return; case JTokenType.Constructor: base.SetToken(JsonToken.StartConstructor); return; case JTokenType.Property: base.SetToken(JsonToken.PropertyName, ((JProperty)jtoken_3).Name); return; case JTokenType.Comment: base.SetToken(JsonToken.Comment, ((JValue)jtoken_3).Value); return; case JTokenType.Integer: base.SetToken(JsonToken.Integer, ((JValue)jtoken_3).Value); return; case JTokenType.Float: base.SetToken(JsonToken.Float, ((JValue)jtoken_3).Value); return; case JTokenType.String: base.SetToken(JsonToken.String, ((JValue)jtoken_3).Value); return; case JTokenType.Boolean: base.SetToken(JsonToken.Boolean, ((JValue)jtoken_3).Value); return; case JTokenType.Null: base.SetToken(JsonToken.Null, ((JValue)jtoken_3).Value); return; case JTokenType.Undefined: base.SetToken(JsonToken.Undefined, ((JValue)jtoken_3).Value); return; case JTokenType.Date: base.SetToken(JsonToken.Date, ((JValue)jtoken_3).Value); return; case JTokenType.Raw: base.SetToken(JsonToken.Raw, ((JValue)jtoken_3).Value); return; case JTokenType.Bytes: base.SetToken(JsonToken.Bytes, ((JValue)jtoken_3).Value); return; case JTokenType.Guid: base.SetToken(JsonToken.String, this.method_20(((JValue)jtoken_3).Value)); return; case JTokenType.Uri: base.SetToken(JsonToken.String, this.method_20(((JValue)jtoken_3).Value)); return; case JTokenType.TimeSpan: base.SetToken(JsonToken.String, this.method_20(((JValue)jtoken_3).Value)); return; } throw Class193.smethod_1("Type", jtoken_3.Type, "Unexpected JTokenType."); }
// Token: 0x06001068 RID: 4200 RVA: 0x0004A810 File Offset: 0x00048A10 private void method_5(Class191 class191_0) { switch (class191_0.Type) { case (Enum13)1: { Class195 @class = (Class195)class191_0; this.binaryWriter_0.Write(Convert.ToDouble(@class.Value, CultureInfo.InvariantCulture)); return; } case (Enum13)2: { Class197 class2 = (Class197)class191_0; this.method_6((string)class2.Value, class2.method_4(), new int?(class2.method_2() - 4)); return; } case (Enum13)3: { Class192 class3 = (Class192)class191_0; this.binaryWriter_0.Write(class3.method_2()); foreach (Class200 class4 in class3) { this.binaryWriter_0.Write((sbyte)class4.Value.Type); this.method_6((string)class4.Name.Value, class4.Name.method_4(), null); this.method_5(class4.Value); } this.binaryWriter_0.Write(0); return; } case (Enum13)4: { Class193 class5 = (Class193)class191_0; this.binaryWriter_0.Write(class5.method_2()); ulong num = 0UL; foreach (Class191 class6 in class5) { this.binaryWriter_0.Write((sbyte)class6.Type); this.method_6(num.ToString(CultureInfo.InvariantCulture), Class79.smethod_0(num), null); this.method_5(class6); num += 1UL; } this.binaryWriter_0.Write(0); return; } case (Enum13)5: { Class198 class7 = (Class198)class191_0; byte[] array = (byte[])class7.Value; this.binaryWriter_0.Write(array.Length); this.binaryWriter_0.Write((byte)class7.method_4()); this.binaryWriter_0.Write(array); return; } case (Enum13)6: case (Enum13)10: return; case (Enum13)7: { byte[] buffer = (byte[])((Class195)class191_0).Value; this.binaryWriter_0.Write(buffer); return; } case (Enum13)8: this.binaryWriter_0.Write(class191_0 == Class196.class196_1); return; case (Enum13)9: { Class195 class8 = (Class195)class191_0; object value; long value2; if ((value = class8.Value) is DateTime) { DateTime dateTime_ = (DateTime)value; if (this.method_0() == DateTimeKind.Utc) { dateTime_ = dateTime_.ToUniversalTime(); } else if (this.method_0() == DateTimeKind.Local) { dateTime_ = dateTime_.ToLocalTime(); } value2 = Class25.smethod_9(dateTime_, false); } else { DateTimeOffset dateTimeOffset = (DateTimeOffset)class8.Value; value2 = Class25.smethod_7(dateTimeOffset.UtcDateTime, dateTimeOffset.Offset); } this.binaryWriter_0.Write(value2); return; } case (Enum13)11: { Class199 class9 = (Class199)class191_0; this.method_6((string)class9.Pattern.Value, class9.Pattern.method_4(), null); this.method_6((string)class9.Options.Value, class9.Options.method_4(), null); return; } case (Enum13)16: { Class195 class10 = (Class195)class191_0; this.binaryWriter_0.Write(Convert.ToInt32(class10.Value, CultureInfo.InvariantCulture)); return; } case (Enum13)18: { Class195 class11 = (Class195)class191_0; this.binaryWriter_0.Write(Convert.ToInt64(class11.Value, CultureInfo.InvariantCulture)); return; } } throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".smethod_0(CultureInfo.InvariantCulture, class191_0.Type)); }
private bool method_10(object object_0, JsonProperty jsonProperty_0) { if ((((NullValueHandling)jsonProperty_0.NullValueHandling.GetValueOrDefault(base.jsonSerializer_0.nullValueHandling_0)) == NullValueHandling.Ignore) && (object_0 == null)) { return(false); } if (this.method_22(jsonProperty_0.DefaultValueHandling.GetValueOrDefault(base.jsonSerializer_0.defaultValueHandling_0), DefaultValueHandling.Ignore) && Class193.smethod_0(object_0, jsonProperty_0.method_1())) { return(false); } return(true); }
private bool method_32(object object_0) { if ((base.jsonSerializer_0.nullValueHandling_0 == NullValueHandling.Ignore) && (object_0 == null)) { return(false); } return(!this.method_22(base.jsonSerializer_0.defaultValueHandling_0, DefaultValueHandling.Ignore) || ((object_0 != null) && !Class193.smethod_0(object_0, Class194.smethod_41(object_0.GetType())))); }
public Interface10 imethod_11(string string_0, string string_1, string string_2) { return(new Class104(new XAttribute(XName.Get(Class193.smethod_5(string_0), string_1), string_2))); }
public override void Visit(Class193 c) { }
public abstract void Visit(Class193 c);
public Class193 method_5() { if (this.class192_0 == null) { throw new InvalidOperationException("Closed."); } if (this.class193_0 != null) { this.method_8(); } int num = this.class201_0.method_10(); if (num != 33639248 && num != 101010256 && num != 84233040 && num != 117853008) { if (num != 101075792) { if (num == 808471376 || num == 134695760) { num = this.class201_0.method_10(); } if (num != 67324752) { throw new ZipException("Wrong Local header signature: 0x" + string.Format("{0:X}", num)); } short int_ = (short)this.class201_0.method_9(); this.int_1 = this.class201_0.method_9(); this.int_0 = this.class201_0.method_9(); uint num2 = (uint)this.class201_0.method_10(); int num3 = this.class201_0.method_10(); this.long_0 = (long)this.class201_0.method_10(); this.long_1 = (long)this.class201_0.method_10(); int num4 = this.class201_0.method_9(); int num5 = this.class201_0.method_9(); bool flag = (this.int_1 & 1) == 1; byte[] array = new byte[num4]; this.class201_0.method_5(array); string string_ = Class186.smethod_2(this.int_1, array); this.class193_0 = new Class193(string_, (int)int_); this.class193_0.method_5(this.int_1); this.class193_0.method_28((Enum31)this.int_0); if ((this.int_1 & 8) == 0) { this.class193_0.method_26((long)num3 & 4294967295L); this.class193_0.method_22(this.long_1 & 4294967295L); this.class193_0.method_24(this.long_0 & 4294967295L); this.class193_0.method_3((byte)(num3 >> 24 & 255)); } else { if (num3 != 0) { this.class193_0.method_26((long)num3 & 4294967295L); } if (this.long_1 != 0L) { this.class193_0.method_22(this.long_1 & 4294967295L); } if (this.long_0 != 0L) { this.class193_0.method_24(this.long_0 & 4294967295L); } this.class193_0.method_3((byte)(num2 >> 8 & 255u)); } this.class193_0.method_18((long)((ulong)num2)); if (num5 > 0) { byte[] array2 = new byte[num5]; this.class201_0.method_5(array2); this.class193_0.method_30(array2); } this.class193_0.method_31(true); if (this.class193_0.method_23() >= 0L) { this.long_0 = this.class193_0.method_23(); } if (this.class193_0.method_21() >= 0L) { this.long_1 = this.class193_0.method_21(); } if (this.int_0 == 0 && ((!flag && this.long_0 != this.long_1) || (flag && this.long_0 - 12L != this.long_1))) { throw new ZipException("Stored, but compressed != uncompressed"); } if (this.class193_0.method_34()) { this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_11); } else { this.delegate5_0 = new ZIPCompressor.Delegate5(this.method_10); } return(this.class193_0); } } this.Close(); return(null); }
// Token: 0x0600106D RID: 4205 RVA: 0x0004AC80 File Offset: 0x00048E80 private int method_10(Class191 class191_0) { switch (class191_0.Type) { case (Enum13)1: return(8); case (Enum13)2: { Class197 @class = (Class197)class191_0; string text = (string)@class.Value; @class.method_5((text != null) ? Class189.utf8Encoding_0.GetByteCount(text) : 0); @class.method_3(this.method_9(@class.method_4(), @class.method_6())); return(@class.method_2()); } case (Enum13)3: { Class192 class2 = (Class192)class191_0; int num = 4; foreach (Class200 class3 in class2) { int num2 = 1 + this.method_10(class3.Name); num2 += this.method_10(class3.Value); num += num2; } num++; class2.method_3(num); return(num); } case (Enum13)4: { Class193 class4 = (Class193)class191_0; int num3 = 4; ulong num4 = 0UL; foreach (Class191 class191_ in class4) { num3++; num3 += this.method_8(Class79.smethod_0(num4)); num3 += this.method_10(class191_); num4 += 1UL; } num3++; class4.method_3(num3); return(class4.method_2()); } case (Enum13)5: { Class198 class5 = (Class198)class191_0; byte[] array = (byte[])class5.Value; class5.method_3(5 + array.Length); return(class5.method_2()); } case (Enum13)6: case (Enum13)10: return(0); case (Enum13)7: return(12); case (Enum13)8: return(1); case (Enum13)9: return(8); case (Enum13)11: { Class199 class6 = (Class199)class191_0; int num5 = 0 + this.method_10(class6.Pattern); num5 += this.method_10(class6.Options); class6.method_3(num5); return(class6.method_2()); } case (Enum13)16: return(4); case (Enum13)18: return(8); } throw new ArgumentOutOfRangeException("t", "Unexpected token when writing BSON: {0}".smethod_0(CultureInfo.InvariantCulture, class191_0.Type)); }