﻿using System;

// All request types are transferred as strings. Each request and response is handled by a class that
// can make a request packet or can interpret a request packet.

namespace Quest.Lib.EISEC
{
    /// <summary>
    /// password change was rejected
    /// </summary>
    internal class EisecPasswordChgReject : EisecPacket
    {
        internal override string Serialize()
        {
            string body = Constants.EisecPasswordChangeReject + $"{_rejectCode}".Substring(0,1);
            return EisecSerialiser.MakeFrame(body);
        }
        internal override void Deserialize(string packet)
        {
            _rejectCode = Int32.Parse(packet.Substring(6, 1));
        }

        int _rejectCode;

        public int RejectCode
        {
            get { return _rejectCode; }
            set { _rejectCode = value; }
        }
    } ;
}