Ejemplo n.º 1
0
        public object Deserialize(Stream inStream)
        {
            VehicleEventMessage msg = (VehicleEventMessage)_serialize.Deserialize(inStream);
            var rc = VehicleEventMessageConverter.FromProtoBuf(msg);

            msg.ReleaseReference();
            return(rc);
        }
Ejemplo n.º 2
0
        public void Serialize(Stream outStream, object message)
        {
            var syncEvent           = (IVehicleSyncEvent)message;
            VehicleEventMessage msg = VehicleEventMessage.Allocate();

            VehicleEventMessageConverter.ToProtoBuf(msg, syncEvent);
            _serialize.Serialize(outStream, msg);
            msg.ReleaseReference();
        }