コード例 #1
0
        public void Read(TProtocol iprot)
        {
            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)
                    {
                        this.result = new ResponseCommon();
                        this.result.Read(iprot);
                        this.__isset.result = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
コード例 #2
0
        public void Read(TProtocol iprot)
        {
            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)
                    {
                        this.result = new ResponseCommon();
                        this.result.Read(iprot);
                        this.__isset.result = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.key_values = new Dictionary <byte[], byte[]>();
                            TMap _map217 = iprot.ReadMapBegin();
                            for (int _i218 = 0; _i218 < _map217.Count; ++_i218)
                            {
                                byte[] _key219;
                                byte[] _val220;
                                _key219 = iprot.ReadBinary();
                                _val220 = iprot.ReadBinary();
                                this.key_values[_key219] = _val220;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.key_values = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
コード例 #3
0
        public void Read(TProtocol iprot)
        {
            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)
                    {
                        this.result = new ResponseCommon();
                        this.result.Read(iprot);
                        this.__isset.result = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        this.edge_data = new nebula.DataSet();
                        this.edge_data.Read(iprot);
                        this.__isset.edge_data = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Bool)
                    {
                        this.has_next         = iprot.ReadBool();
                        this.__isset.has_next = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.String)
                    {
                        this.next_cursor         = iprot.ReadBinary();
                        this.__isset.next_cursor = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
コード例 #4
0
        public void Read(TProtocol iprot)
        {
            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)
                    {
                        this.result = new ResponseCommon();
                        this.result.Read(iprot);
                        this.__isset.result = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.leader_parts = new Dictionary <int, List <int> >();
                            TMap _map191 = iprot.ReadMapBegin();
                            for (int _i192 = 0; _i192 < _map191.Count; ++_i192)
                            {
                                int        _key193;
                                List <int> _val194;
                                _key193 = iprot.ReadI32();
                                {
                                    _val194 = new List <int>();
                                    TList _list195 = iprot.ReadListBegin();
                                    for (int _i196 = 0; _i196 < _list195.Count; ++_i196)
                                    {
                                        int _elem197 = 0;
                                        _elem197 = iprot.ReadI32();
                                        _val194.Add(_elem197);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.leader_parts[_key193] = _val194;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.leader_parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }