Example #1
0
        public void Read(TProtocol iprot)
        {
            bool   isset_status    = false;
            bool   isset_infoValue = false;
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.Struct)
                    {
                        Status = new TStatus();
                        Status.Read(iprot);
                        isset_status = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        InfoValue = new TGetInfoValue();
                        InfoValue.Read(iprot);
                        isset_infoValue = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_status)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_infoValue)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Example #2
0
 public TGetInfoResp(TStatus status, TGetInfoValue infoValue) : this()
 {
     this.Status    = status;
     this.InfoValue = infoValue;
 }