internal void method_18(string string_1) { if ((string_1 != null) && !Class198.smethod_4(string_1)) { throw JsonWriterException.smethod_1(this, "Only white space characters should be used.", null); } }
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { if (value == null) { writer.WriteNull(); } else { Enum enum2 = (Enum)value; string str = enum2.ToString("G"); if (!char.IsNumber(str[0]) && (str[0] != '-')) { Class179 <string, string> class2 = this.method_0(enum2.GetType()); string[] strArray = str.Split(new char[] { ',' }); for (int i = 0; i < strArray.Length; i++) { string str3; string str2 = strArray[i].Trim(); class2.method_1(str2, out str3); str3 = str3 ?? str2; if (this.CamelCaseText) { str3 = Class198.smethod_10(str3); } strArray[i] = str3; } string str4 = string.Join(", ", strArray); writer.WriteValue(str4); } else { writer.WriteValue(value); } } }
public static string ToString(DateTimeOffset value, DateFormatHandling format) { using (StringWriter writer = Class198.smethod_6(0x40)) { writer.Write('"'); Class184.smethod_21(writer, value, format, null, CultureInfo.InvariantCulture); writer.Write('"'); return(writer.ToString()); } }
public static string ToString(DateTime value, DateFormatHandling format, DateTimeZoneHandling timeZoneHandling) { DateTime time = Class184.smethod_2(value, timeZoneHandling); using (StringWriter writer = Class198.smethod_6(0x40)) { writer.Write('"'); Class184.smethod_16(writer, time, format, null, CultureInfo.InvariantCulture); writer.Write('"'); return(writer.ToString()); } }
void Interface1.Draw(Class196 dc, Class375 ltWidget) { string dropDownValue = string.Empty; if (this.dropDownCollection_0.Count > 0) { dropDownValue = this.DropDownValue; } Class198 class2 = new Class198 { drawingTextDirection_0 = DrawingTextDirection.Horizontal }; dc.method_233(dropDownValue, this.CharacterFormat, null, ltWidget.method_69(), ltWidget.method_69().Width, class2); }
protected internal override string ResolvePropertyName(string propertyName) { return(Class198.smethod_10(propertyName)); }
private void method_22(char char_3) { int num4; char ch; char ch2; char ch4; int index = this.int_1; int startIndex = this.int_1; int num3 = this.int_1; Class190 class2 = null; goto Label_0299; Label_009B: ch2 = ch; index++; Label_0211: if (class2 == null) { class2 = this.method_14(); } this.method_23(class2, ch2, num3, num4); num3 = index; Label_0299: ch4 = this.char_2[index++]; if (ch4 > '\r') { switch (ch4) { case '"': case '\'': if (this.char_2[index - 1] != char_3) { goto Label_0299; } index--; if (startIndex == num3) { this.struct29_0 = new Struct29(this.char_2, startIndex, index - startIndex); } else { if (class2 == null) { class2 = this.method_14(); } if (index > num3) { class2.method_1(this.char_2, num3, index - num3); } this.struct29_0 = new Struct29(class2.method_5(), 0, class2.Int32_0); } index++; this.int_1 = index; return; } if (ch4 != '\\') { goto Label_0299; } this.int_1 = index; if (!this.method_20(0, true)) { this.int_1 = index; throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3)); } num4 = index - 1; ch = this.char_2[index]; char ch5 = ch; if (ch5 > '\\') { if (ch5 <= 'f') { if (ch5 != 'b') { if (ch5 != 'f') { goto Label_02F8; } index++; ch2 = '\f'; } else { index++; ch2 = '\b'; } goto Label_0211; } switch (ch5) { case 'r': index++; ch2 = '\r'; goto Label_0211; case 't': index++; ch2 = '\t'; goto Label_0211; case 'u': index++; this.int_1 = index; ch2 = this.method_24(); if (!Class198.smethod_12(ch2)) { if (Class198.smethod_11(ch2)) { bool flag; do { flag = false; if (!this.method_20(2, true) || ((this.char_2[this.int_1] != '\\') || (this.char_2[this.int_1 + 1] != 'u'))) { ch2 = 0xfffd; } else { char ch3 = ch2; this.int_1 += 2; ch2 = this.method_24(); if (!Class198.smethod_12(ch2)) { if (Class198.smethod_11(ch2)) { ch3 = 0xfffd; flag = true; } else { ch3 = 0xfffd; } } if (class2 == null) { class2 = this.method_14(); } this.method_23(class2, ch3, num3, num4); num3 = this.int_1; } }while (flag); } } else { ch2 = 0xfffd; } index = this.int_1; goto Label_0211; case 'n': index++; ch2 = '\n'; goto Label_0211; } goto Label_02F8; } if (ch5 <= '\'') { switch (ch5) { case '"': case '\'': goto Label_009B; } goto Label_02F8; } if (ch5 != '/') { if (ch5 != '\\') { goto Label_02F8; } index++; ch2 = '\\'; goto Label_0211; } goto Label_009B; } switch (ch4) { case '\0': if (this.int_0 == (index - 1)) { index--; if (this.method_18(true) == 0) { this.int_1 = index; throw JsonReaderException.smethod_1(this, "Unterminated string. Expected delimiter: {0}.".smethod_0(CultureInfo.InvariantCulture, char_3)); } } break; case '\n': this.int_1 = index - 1; this.method_33(); index = this.int_1; break; case '\r': this.int_1 = index - 1; this.method_34(true); index = this.int_1; break; } goto Label_0299; Label_02F8: index++; this.int_1 = index; throw JsonReaderException.smethod_1(this, "Bad JSON escape sequence: {0}.".smethod_0(CultureInfo.InvariantCulture, @"\" + ch)); }
public abstract void Visit(Class198 c);
public override void Visit(Class198 c) { }
// 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)); }
// 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)); }