Пример #1
0
        public void Read(TProtocol iprot)
        {
            bool   isset_settable = false;
            bool   isset_version  = 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)
                    {
                        Settable = new SettableBlobMeta();
                        Settable.Read(iprot);
                        isset_settable = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I64)
                    {
                        Version       = iprot.ReadI64();
                        isset_version = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            if (!isset_settable)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
            if (!isset_version)
            {
                throw new TProtocolException(TProtocolException.INVALID_DATA);
            }
        }
Пример #2
0
 public ReadableBlobMeta(SettableBlobMeta settable, long version) : this()
 {
     this.Settable = settable;
     this.Version  = version;
 }