コード例 #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.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 <EdgeKey> >();
                            TMap _map130 = iprot.ReadMapBegin();
                            for (int _i131 = 0; _i131 < _map130.Count; ++_i131)
                            {
                                int            _key132;
                                List <EdgeKey> _val133;
                                _key132 = iprot.ReadI32();
                                {
                                    _val133 = new List <EdgeKey>();
                                    TList _list134 = iprot.ReadListBegin();
                                    for (int _i135 = 0; _i135 < _list134.Count; ++_i135)
                                    {
                                        EdgeKey _elem136 = new EdgeKey();
                                        _elem136 = new EdgeKey();
                                        _elem136.Read(iprot);
                                        _val133.Add(_elem136);
                                    }
                                    iprot.ReadListEnd();
                                }
                                this.parts[_key132] = _val133;
                            }
                            iprot.ReadMapEnd();
                        }
                        this.__isset.parts = 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.I32)
                    {
                        this.part_id         = iprot.ReadI32();
                        this.__isset.part_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            this.updated_props = new List <UpdatedProp>();
                            TList _list147 = iprot.ReadListBegin();
                            for (int _i148 = 0; _i148 < _list147.Count; ++_i148)
                            {
                                UpdatedProp _elem149 = new UpdatedProp();
                                _elem149 = new UpdatedProp();
                                _elem149.Read(iprot);
                                this.updated_props.Add(_elem149);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.updated_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

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

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

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

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