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

            msg.ReleaseReference();
            return(rc);
        }
Пример #2
0
        public static SimulationTimeMessageItem ToProtoBuf(SimulationTimeMessage msg)
        {
            var item = SimulationTimeMessageItem.Allocate();

            item.ClientSimulationTime = msg.ClientSimulationTime;
            item.ServerSimulationTime = msg.ServerSimulationTime;


            return(item);
        }
Пример #3
0
        public static SimulationTimeMessage FromProtoBuf(SimulationTimeMessageItem item)
        {
            var msg = new SimulationTimeMessage()
            {
                ClientSimulationTime = item.ClientSimulationTime,
                ServerSimulationTime = item.ServerSimulationTime
            };

            return(msg);
        }