Exemplo n.º 1
0
 /// <summary>
 ///     Writes content of the message into a packet
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="packetToBeFilled"></param>
 /// <returns></returns>
 public T Deserialize <T>(T packetToBeFilled) where T : ISerializablePacket
 {
     return(MessageHelper.Deserialize(_data, packetToBeFilled));
 }
Exemplo n.º 2
0
        /// <summary>
        ///     Writes content of the message into a packet
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="packetToBeFilled"></param>
        /// <returns></returns>
        public T Deserialize <T>() where T : ISerializablePacket, new()
        {
            var packetToBeFilled = new T();

            return(MessageHelper.Deserialize(_data, packetToBeFilled));
        }