예제 #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.key = new EdgeKey();
                        this.key.Read(iprot);
                        this.__isset.key = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.props = new List <nebula.Value>();
                            TList _list86 = iprot.ReadListBegin();
                            for (int _i87 = 0; _i87 < _list86.Count; ++_i87)
                            {
                                nebula.Value _elem88 = new nebula.Value();
                                _elem88 = new nebula.Value();
                                _elem88.Read(iprot);
                                this.props.Add(_elem88);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.props = 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.I32)
                    {
                        this.tag_id         = iprot.ReadI32();
                        this.__isset.tag_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.List)
                    {
                        {
                            this.props = new List <nebula.Value>();
                            TList _list78 = iprot.ReadListBegin();
                            for (int _i79 = 0; _i79 < _list78.Count; ++_i79)
                            {
                                nebula.Value _elem80 = new nebula.Value();
                                _elem80 = new nebula.Value();
                                _elem80.Read(iprot);
                                this.props.Add(_elem80);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.props = 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.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            this.parts = new Dictionary <int, List <nebula.Value> >();
                            TMap _map121 = iprot.ReadMapBegin();
                            for (int _i122 = 0; _i122 < _map121.Count; ++_i122)
                            {
                                int _key123;
                                List <nebula.Value> _val124;
                                _key123 = iprot.ReadI32();
                                {
                                    _val124 = new List <nebula.Value>();
                                    TList _list125 = iprot.ReadListBegin();
                                    for (int _i126 = 0; _i126 < _list125.Count; ++_i126)
                                    {
                                        nebula.Value _elem127 = new nebula.Value();
                                        _elem127 = new nebula.Value();
                                        _elem127.Read(iprot);
                                        _val124.Add(_elem127);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.parts[_key123] = _val124;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.parts = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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