private int method_12(Stream A_0, Dictionary <int, string> A_1) { int num = 0; int count = A_1.Count; num = 0 + Class1115.smethod_4(A_0, count); foreach (KeyValuePair <int, string> pair in A_1) { num += Class1115.smethod_4(A_0, pair.Key); num += Class1115.smethod_8(A_0, pair.Value); } return(num); }
private int method_14(Stream A_0, object A_1, PropertyType A_2) { int num = 0; switch (A_2) { case PropertyType.Empty: case PropertyType.Null: return(num); case PropertyType.Int16: return(num + Class1115.smethod_3(A_0, (short)A_1)); case PropertyType.Int32: case PropertyType.Int: return(num + Class1115.smethod_4(A_0, (int)A_1)); case PropertyType.Double: return(num + Class1115.smethod_5(A_0, (double)A_1)); case PropertyType.Bool: { bool flag = (bool)A_1; return(num + Class1115.smethod_4(A_0, flag ? 1 : 0)); } case PropertyType.Object: return(num + this.method_10(A_0, A_1)); case PropertyType.UInt32: return(num + Class1115.smethod_4(A_0, (int)((uint)A_1))); case PropertyType.AsciiString: return(num + Class1115.smethod_8(A_0, (string)A_1)); case PropertyType.String: return(num + Class1115.smethod_9(A_0, (string)A_1)); case PropertyType.DateTime: { DateTime time; if (A_1 is TimeSpan) { TimeSpan span = (TimeSpan)A_1; time = DateTime.FromBinary(span.Ticks); } else { time = (DateTime)A_1; } if (this.Interface37.imethod_3() != 10) { time = time.ToUniversalTime(); } ulong num2 = (ulong)(time.Ticks - 0x701ce1722770000L); byte[] bytes = BitConverter.GetBytes(num2); A_0.Write(bytes, 0, bytes.Length); return(num + bytes.Length); } case PropertyType.Blob: { byte[] buffer = (byte[])A_1; return(num + this.method_15(A_0, buffer)); } } throw new NotImplementedException(); }