Beispiel #1
0
 private static void WriteCustomType(IBinaryWriter writer, CustomTypeInfo customTypeInfo, object value)
 {
     writer.WriteByte(customTypeInfo.Code);
     byte[] buffer = customTypeInfo.SerializeFunction(value);
     writer.WriteInt16((short)buffer.Length);
     writer.WriteBytes(buffer);
 }
Beispiel #2
0
 private static void WriteCustomType(Stream stream, CustomTypeInfo customTypeInfo, object value, bool writeType)
 {
     if (writeType)
     {
         stream.WriteByte(0x63);
     }
     stream.WriteByte(customTypeInfo.Code);
     byte[] buffer = customTypeInfo.SerializeFunction(value);
     WriteIntLength(stream, buffer.Length);
     stream.Write(buffer, 0, buffer.Length);
 }
Beispiel #3
0
 private static void WriteCustomTypeArray(IBinaryWriter writer, CustomTypeInfo customTypeInfo, IList list)
 {
     writer.WriteInt16((short)list.Count);
     writer.WriteByte(0x63);
     writer.WriteByte(customTypeInfo.Code);
     foreach (object obj2 in list)
     {
         byte[] buffer = customTypeInfo.SerializeFunction(obj2);
         writer.WriteInt16((short)buffer.Length);
         writer.WriteBytes(buffer);
     }
 }
Beispiel #4
0
 private static void WriteCustomTypeArray(Stream stream, CustomTypeInfo customTypeInfo, IList list)
 {
     stream.WriteByte(0xe3);
     WriteIntLength(stream, (short)list.Count);
     stream.WriteByte(customTypeInfo.Code);
     foreach (object obj2 in list)
     {
         byte[] buffer = customTypeInfo.SerializeFunction(obj2);
         WriteIntLength(stream, buffer.Length);
         stream.Write(buffer, 0, buffer.Length);
     }
 }