Exemple #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.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.parts = new List <int>();
                            TList _list171 = iprot.ReadListBegin();
                            for (int _i172 = 0; _i172 < _list171.Count; ++_i172)
                            {
                                int _elem173 = 0;
                                _elem173 = iprot.ReadI32();
                                this.parts.Add(_elem173);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        this.indices = new IndexSpec();
                        this.indices.Read(iprot);
                        this.__isset.indices = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Struct)
                    {
                        this.traverse_spec = new TraverseSpec();
                        this.traverse_spec.Read(iprot);
                        this.__isset.traverse_spec = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
Exemple #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.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.column_names = new List <byte[]>();
                            TList _list36 = iprot.ReadListBegin();
                            for (int _i37 = 0; _i37 < _list36.Count; ++_i37)
                            {
                                byte[] _elem38 = null;
                                _elem38 = iprot.ReadBinary();
                                this.column_names.Add(_elem38);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.column_names = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.parts = new Dictionary <int, List <nebula.Row> >();
                            TMap _map39 = iprot.ReadMapBegin();
                            for (int _i40 = 0; _i40 < _map39.Count; ++_i40)
                            {
                                int _key41;
                                List <nebula.Row> _val42;
                                _key41 = iprot.ReadI32();
                                {
                                    _val42 = new List <nebula.Row>();
                                    TList _list43 = iprot.ReadListBegin();
                                    for (int _i44 = 0; _i44 < _list43.Count; ++_i44)
                                    {
                                        nebula.Row _elem45 = new nebula.Row();
                                        _elem45 = new nebula.Row();
                                        _elem45.Read(iprot);
                                        _val42.Add(_elem45);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.parts[_key41] = _val42;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Struct)
                    {
                        this.traverse_spec = new TraverseSpec();
                        this.traverse_spec.Read(iprot);
                        this.__isset.traverse_spec = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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