/// <summary>
        /// Serializes and writes a NGRIDMessage according to the protocol rules.
        /// </summary>
        /// <param name="serializer">Serializer to serialize message</param>
        /// <param name="message">Message to be serialized</param>
        public void WriteMessage(INGRIDSerializer serializer, NGRIDMessage message)
        {
            //Write protocol type
            serializer.WriteUInt32(NGRIDDefaultProtocolType);

            //Write the message type
            serializer.WriteInt32(message.MessageTypeId);

            //Write message
            serializer.WriteObject(message);
        }
 /// <summary>
 /// Serializes and writes a NGRIDMessage according to the protocol rules.
 /// </summary>
 /// <param name="serializer">Serializer to serialize message</param>
 /// <param name="message">Message to be serialized</param>
 public void WriteMessage(INGRIDSerializer serializer, NGRIDMessage message)
 {
     //Write protocol type
     serializer.WriteUInt32(NGRIDDefaultProtocolType);
     
     //Write the message type
     serializer.WriteInt32(message.MessageTypeId);
     
     //Write message
     serializer.WriteObject(message);
 }