/// <summary>
        /// This method encodes
        /// </summary>
        /// <param name="bytes"></param>
        virtual public void Encode(ByteList bytes)
        {
            bytes.Add(ClassId);                            // Write out the class type

            Int16 lengthPos = bytes.CurrentWritePosition;  // Get the current write position, so we

            // can write the length here later

            bytes.Add((Int16)0);                             // Write out a place holder for the length

            bytes.AddObjects(MessageNr, ConversationId);

            Int16 length = Convert.ToInt16(bytes.CurrentWritePosition - lengthPos - 2);

            bytes.WriteInt16To(lengthPos, length);           // Write out the length of this object
        }
Exemple #2
0
        override public void Encode(ByteList bytes)
        {
            bytes.Add(ClassId);                              // Write out this class id first

            Int16 lengthPos = bytes.CurrentWritePosition;    // Get the current write position, so we

            // can write the length here later
            bytes.Add((Int16)0);                             // Write out a place holder for the length


            base.Encode(bytes);                              // Encode the part of the object defined
            // by the base class
            bytes.AddObjects(GameId, AgentInfo);

            Int16 length = Convert.ToInt16(bytes.CurrentWritePosition - lengthPos - 2);

            bytes.WriteInt16To(lengthPos, length);           // Write out the length of this object
        }
Exemple #3
0
        override public void Encode(ByteList bytes)
        {
            bytes.Add(ClassId);                              // Write out this class id first

            Int16 lengthPos = bytes.CurrentWritePosition;    // Get the current write position, so we

            // can write the length here later
            bytes.Add((Int16)0);                             // Write out a place holder for the length


            base.Encode(bytes);                              // Encode the part of the object defined
                                                             // by the base class

            bytes.AddObjects(ThrowingBrilliantStudentId, Bomb, TowardsSquare, EnablingTick);

            Int16 length = Convert.ToInt16(bytes.CurrentWritePosition - lengthPos - 2);

            bytes.WriteInt16To(lengthPos, length);           // Write out the length of this object
        }
        override public void Encode(ByteList bytes)
        {
            bytes.Add(ClassId);                           // Write out this class id first

            Int16 lengthPos = bytes.CurrentWritePosition; // Get the current write position, so we

            // can write the length here later
            bytes.Add((Int16)0);                            // Write out a place holder for the length

            base.Encode(bytes);                             // Encode stuff from base class

            if (Message == null)
            {
                Message = string.Empty;
            }
            bytes.AddObjects(IntResult, ObjResult, Message);

            Int16 length = Convert.ToInt16(bytes.CurrentWritePosition - lengthPos - 2);

            bytes.WriteInt16To(lengthPos, length);          // Write out the length of this object
        }