Пример #1
0
        public object Deserialize(Stream inStream)
        {
            VehicleCmdMessage msg = (VehicleCmdMessage)_serialize.Deserialize(inStream);
            var rc = VehicleCmdMessageConverter.FromProtoBuf(msg);

            msg.ReleaseReference();
            return(rc);
        }
Пример #2
0
        public void Serialize(Stream outStream, object message)
        {
            ReusableList <IVehicleCmd> list = (ReusableList <IVehicleCmd>)message;
            VehicleCmdMessage          msg  = VehicleCmdMessage.Allocate();

            VehicleCmdMessageConverter.ToProtoBuf(msg, list);
            _serialize.Serialize(outStream, msg);
            msg.ReleaseReference();
        }