/// <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)); }
/// <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)); }