public void Serialize(BufferWriter writer, UnmanagedArray <T> instance, SerializationContext context) { writer.Write(instance.length); if (instance.Length > 0) { writer.Write((void *)instance.data, instance.length); } }
public void Serialize(BufferWriter writer, UnmanagedBuffer instance, SerializationContext context) { unsafe { writer.Write(instance.Size); writer.Write(instance.Data.ToPointer(), instance.Size); } }