Ejemplo n.º 1
0
        public void Read(TReader reader, message_id selector)
        {
            reader.ReadUnionBegin("message_body");
            switch (selector)
            {
            case message_id.E_MID_LOGIN_REQ:
                if (reader.ReadFieldBegin("login_req"))
                {
                    this._login_req = new login_req();
                    this._login_req.Read(reader);
                }
                reader.ReadFieldEnd("login_req");
                break;

            case message_id.E_MID_LOGIN_RSP:
                if (reader.ReadFieldBegin("login_rsp"))
                {
                    this._login_rsp = new login_rsp();
                    this._login_rsp.Read(reader);
                }
                reader.ReadFieldEnd("login_rsp");
                break;

            default:
                break;
            }
            reader.ReadUnionEnd("message_body");
        }