// Token: 0x06000AE5 RID: 2789 RVA: 0x0003F570 File Offset: 0x0003D770 private bool pmethod_1899() { this.field_4 = Class_408.Read; if (this.prop_9 != Class_508.StartObject) { return(false); } if (!this.tmethod_1892()) { throw Class_414.lmethod_3098(this, "Unexpected end when reading bytes."); } if (this.prop_10.ToString() == "$type") { this.tmethod_1892(); if (this.prop_10 != null && this.prop_10.ToString().StartsWith("System.Byte[]", StringComparison.Ordinal)) { this.tmethod_1892(); if (this.prop_10.ToString() == "$value") { return(true); } } } throw Class_414.lmethod_3098(this, "Error reading bytes. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, Class_508.StartObject)); }
// Token: 0x06000AED RID: 2797 RVA: 0x0003F814 File Offset: 0x0003DA14 protected void kmethod_1907() { Class_325 class_ = this.cmethod_1884(); switch (class_) { case Class_325.None: this.lmethod_1908(); return; case Class_325.Object: this.field_3 = Class_285.NClass_0.field_9; return; case Class_325.Array: this.field_3 = Class_285.NClass_0.field_11; return; case Class_325.Constructor: this.field_3 = Class_285.NClass_0.field_15; return; default: throw Class_414.lmethod_3098(this, "While setting the reader state back to current object an unexpected JsonType was encountered: {0}".FormatWith(CultureInfo.InvariantCulture, class_)); } }
// Token: 0x06000ADF RID: 2783 RVA: 0x0003ED2C File Offset: 0x0003CF2C internal DateTimeOffset?gmethod_1893() { this.field_4 = Class_408.ReadAsDateTimeOffset; while (this.tmethod_1892()) { Class_508 class_ = this.prop_9; if (class_ != Class_508.Comment) { if (class_ == Class_508.Date) { if (this.prop_10 is DateTime) { this.gmethod_1903(Class_508.Date, new DateTimeOffset((DateTime)this.prop_10), false); } return(new DateTimeOffset?((DateTimeOffset)this.prop_10)); } if (class_ == Class_508.Null) { return(null); } if (class_ == Class_508.String) { string text = (string)this.prop_10; if (string.IsNullOrEmpty(text)) { this.xmethod_1901(Class_508.Null); return(null); } object obj; DateTimeOffset dateTimeOffset; if (Class_502.TryParseDateTime(text, Class_320.DateTimeOffset, this.prop_4, this.field_12, this.prop_14, out obj)) { dateTimeOffset = (DateTimeOffset)obj; this.gmethod_1903(Class_508.Date, dateTimeOffset, false); return(new DateTimeOffset?(dateTimeOffset)); } if (DateTimeOffset.TryParse(text, this.prop_14, DateTimeStyles.RoundtripKind, out dateTimeOffset)) { this.gmethod_1903(Class_508.Date, dateTimeOffset, false); return(new DateTimeOffset?(dateTimeOffset)); } throw Class_414.lmethod_3098(this, "Could not convert string to DateTimeOffset: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_10)); } else { if (class_ == Class_508.EndArray) { return(null); } throw Class_414.lmethod_3098(this, "Error reading date. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, class_)); } } } this.xmethod_1901(Class_508.None); return(null); }
// Token: 0x06000AE2 RID: 2786 RVA: 0x0003F1CC File Offset: 0x0003D3CC internal int?dmethod_1896() { this.field_4 = Class_408.ReadAsInt32; while (this.tmethod_1892()) { Class_508 class_ = this.prop_9; if (class_ != Class_508.Comment) { if (class_ == Class_508.Integer || class_ == Class_508.Float) { if (!(this.prop_10 is int)) { this.gmethod_1903(Class_508.Integer, Convert.ToInt32(this.prop_10, CultureInfo.InvariantCulture), false); } return(new int?((int)this.prop_10)); } if (class_ == Class_508.Null) { return(null); } if (class_ == Class_508.String) { string text = (string)this.prop_10; if (string.IsNullOrEmpty(text)) { this.xmethod_1901(Class_508.Null); return(null); } int num; if (int.TryParse(text, NumberStyles.Integer, this.prop_14, out num)) { this.gmethod_1903(Class_508.Integer, num, false); return(new int?(num)); } throw Class_414.lmethod_3098(this, "Could not convert string to integer: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_10)); } else { if (class_ == Class_508.EndArray) { return(null); } throw Class_414.lmethod_3098(this, "Error reading integer. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_9)); } } } this.xmethod_1901(Class_508.None); return(null); }
// Token: 0x06000AE1 RID: 2785 RVA: 0x0003F088 File Offset: 0x0003D288 internal decimal?vmethod_1895() { this.field_4 = Class_408.ReadAsDecimal; while (this.tmethod_1892()) { Class_508 class_ = this.prop_9; if (class_ != Class_508.Comment) { if (class_ == Class_508.Integer || class_ == Class_508.Float) { if (!(this.prop_10 is decimal)) { this.gmethod_1903(Class_508.Float, Convert.ToDecimal(this.prop_10, CultureInfo.InvariantCulture), false); } return(new decimal?((decimal)this.prop_10)); } if (class_ == Class_508.Null) { return(null); } if (class_ == Class_508.String) { string text = (string)this.prop_10; if (string.IsNullOrEmpty(text)) { this.xmethod_1901(Class_508.Null); return(null); } decimal num; if (decimal.TryParse(text, NumberStyles.Number, this.prop_14, out num)) { this.gmethod_1903(Class_508.Float, num, false); return(new decimal?(num)); } throw Class_414.lmethod_3098(this, "Could not convert string to decimal: {0}.".FormatWith(CultureInfo.InvariantCulture, this.prop_10)); } else { if (class_ == Class_508.EndArray) { return(null); } throw Class_414.lmethod_3098(this, "Error reading decimal. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, class_)); } } } this.xmethod_1901(Class_508.None); return(null); }
// Token: 0x06000AEC RID: 2796 RVA: 0x0003F7B8 File Offset: 0x0003D9B8 private void dmethod_1906(Class_508 arg_0) { Class_325 class_ = this.gmethod_1883(); if (this.pmethod_1909(arg_0) != class_) { throw Class_414.lmethod_3098(this, "JsonToken {0} is not valid for closing JsonType {1}.".FormatWith(CultureInfo.InvariantCulture, arg_0, class_)); } if (this.cmethod_1884() != Class_325.None) { this.field_3 = Class_285.NClass_0.field_13; return; } this.lmethod_1908(); }
// Token: 0x06000AD4 RID: 2772 RVA: 0x0003EBA0 File Offset: 0x0003CDA0 private void tmethod_1882(Class_325 arg_0) { this.vmethod_1905(); if (this.field_5.Type == Class_325.None) { this.field_5 = new Class_326(arg_0); return; } this.field_13.Add(this.field_5); this.field_5 = new Class_326(arg_0); if (this.field_8 != null && this.prop_12 + 1 > this.field_8 && !this.field_9) { this.field_9 = true; throw Class_414.lmethod_3098(this, "The reader's MaxDepth of {0} has been exceeded.".FormatWith(CultureInfo.InvariantCulture, this.field_8)); } }
// Token: 0x06000AEF RID: 2799 RVA: 0x0003F8A0 File Offset: 0x0003DAA0 private Class_325 pmethod_1909(Class_508 arg_0) { switch (arg_0) { case Class_508.EndObject: return(Class_325.Object); case Class_508.EndArray: return(Class_325.Array); case Class_508.EndConstructor: return(Class_325.Constructor); default: throw Class_414.lmethod_3098(this, "Not a valid close JsonToken: {0}".FormatWith(CultureInfo.InvariantCulture, arg_0)); } }
// Token: 0x06000AE3 RID: 2787 RVA: 0x0003F314 File Offset: 0x0003D514 internal string kmethod_1897() { this.field_4 = Class_408.ReadAsString; while (this.tmethod_1892()) { Class_508 class_ = this.prop_9; if (class_ != Class_508.Comment) { if (class_ == Class_508.String) { return((string)this.prop_10); } if (class_ == Class_508.Null) { return(null); } if (Class_486.IsPrimitiveToken(class_) && this.prop_10 != null) { string text; if (this.prop_10 is IFormattable) { text = ((IFormattable)this.prop_10).ToString(null, this.prop_14); } else { text = this.prop_10.ToString(); } this.gmethod_1903(Class_508.String, text, false); return(text); } if (class_ == Class_508.EndArray) { return(null); } throw Class_414.lmethod_3098(this, "Error reading string. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, class_)); } } this.xmethod_1901(Class_508.None); return(null); }
// Token: 0x060010E6 RID: 4326 RVA: 0x00055196 File Offset: 0x00053396 internal static Class_414 pmethod_3099(Class_285 arg_0, string str_0, Exception arg_1) { return(Class_414.smethod_3100(arg_0 as Class_353, arg_0.prop_13, str_0, arg_1)); }
// Token: 0x060010E5 RID: 4325 RVA: 0x0005518C File Offset: 0x0005338C internal static Class_414 lmethod_3098(Class_285 arg_0, string str_0) { return(Class_414.pmethod_3099(arg_0, str_0, null)); }
// Token: 0x06000AE0 RID: 2784 RVA: 0x0003EEB0 File Offset: 0x0003D0B0 internal byte[] cmethod_1894() { this.field_4 = Class_408.ReadAsBytes; while (this.tmethod_1892()) { Class_508 class_ = this.prop_9; if (class_ != Class_508.Comment) { if (this.pmethod_1899()) { byte[] array = this.lmethod_1888(); this.tmethod_1892(); this.gmethod_1903(Class_508.Bytes, array, false); return(array); } if (class_ == Class_508.String) { string text = (string)this.prop_10; byte[] array2; Guid guid; if (text.Length == 0) { array2 = new byte[0]; } else if (Guid.TryParse(text, out guid)) { array2 = guid.ToByteArray(); } else { array2 = Convert.FromBase64String(text); } this.gmethod_1903(Class_508.Bytes, array2, false); return(array2); } if (class_ == Class_508.Null) { return(null); } if (class_ == Class_508.Bytes) { if (this.prop_11 == typeof(Guid)) { byte[] array3 = ((Guid)this.prop_10).ToByteArray(); this.gmethod_1903(Class_508.Bytes, array3, false); return(array3); } return((byte[])this.prop_10); } else { if (class_ == Class_508.StartArray) { List <byte> list = new List <byte>(); while (this.tmethod_1892()) { class_ = this.prop_9; Class_508 class_2 = class_; switch (class_2) { case Class_508.Comment: continue; case Class_508.Raw: break; case Class_508.Integer: list.Add(Convert.ToByte(this.prop_10, CultureInfo.InvariantCulture)); continue; default: if (class_2 == Class_508.EndArray) { byte[] array4 = list.ToArray(); this.gmethod_1903(Class_508.Bytes, array4, false); return(array4); } break; } throw Class_414.lmethod_3098(this, "Unexpected token when reading bytes: {0}.".FormatWith(CultureInfo.InvariantCulture, class_)); } throw Class_414.lmethod_3098(this, "Unexpected end when reading bytes."); } if (class_ == Class_508.EndArray) { return(null); } throw Class_414.lmethod_3098(this, "Error reading bytes. Unexpected token: {0}.".FormatWith(CultureInfo.InvariantCulture, class_)); } } } this.xmethod_1901(Class_508.None); return(null); }