Exemplo n.º 1
0
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                await iprot.ReadStructBeginAsync(cancellationToken);

                while (true)
                {
                    field = await iprot.ReadFieldBeginAsync(cancellationToken);

                    if (field.Type == TType.Stop)
                    {
                        break;
                    }

                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list36 = await iprot.ReadListBeginAsync(cancellationToken);

                                Row_desc = new List <TColumnType>(_list36.Count);
                                for (int _i37 = 0; _i37 < _list36.Count; ++_i37)
                                {
                                    TColumnType _elem38;
                                    _elem38 = new TColumnType();
                                    await _elem38.ReadAsync(iprot, cancellationToken);

                                    Row_desc.Add(_elem38);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list39 = await iprot.ReadListBeginAsync(cancellationToken);

                                Rows = new List <TRow>(_list39.Count);
                                for (int _i40 = 0; _i40 < _list39.Count; ++_i40)
                                {
                                    TRow _elem41;
                                    _elem41 = new TRow();
                                    await _elem41.ReadAsync(iprot, cancellationToken);

                                    Rows.Add(_elem41);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list42 = await iprot.ReadListBeginAsync(cancellationToken);

                                Columns = new List <TColumn>(_list42.Count);
                                for (int _i43 = 0; _i43 < _list42.Count; ++_i43)
                                {
                                    TColumn _elem44;
                                    _elem44 = new TColumn();
                                    await _elem44.ReadAsync(iprot, cancellationToken);

                                    Columns.Add(_elem44);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Bool)
                        {
                            Is_columnar = await iprot.ReadBoolAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    default:
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                        break;
                    }

                    await iprot.ReadFieldEndAsync(cancellationToken);
                }

                await iprot.ReadStructEndAsync(cancellationToken);
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Exemplo n.º 2
0
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                TField field;
                await iprot.ReadStructBeginAsync(cancellationToken);

                while (true)
                {
                    field = await iprot.ReadFieldBeginAsync(cancellationToken);

                    if (field.Type == TType.Stop)
                    {
                        break;
                    }

                    switch (field.ID)
                    {
                    case 1:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list8 = await iprot.ReadListBeginAsync(cancellationToken);

                                Int_col = new List <long>(_list8.Count);
                                for (int _i9 = 0; _i9 < _list8.Count; ++_i9)
                                {
                                    long _elem10;
                                    _elem10 = await iprot.ReadI64Async(cancellationToken);

                                    Int_col.Add(_elem10);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list11 = await iprot.ReadListBeginAsync(cancellationToken);

                                Real_col = new List <double>(_list11.Count);
                                for (int _i12 = 0; _i12 < _list11.Count; ++_i12)
                                {
                                    double _elem13;
                                    _elem13 = await iprot.ReadDoubleAsync(cancellationToken);

                                    Real_col.Add(_elem13);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list14 = await iprot.ReadListBeginAsync(cancellationToken);

                                Str_col = new List <string>(_list14.Count);
                                for (int _i15 = 0; _i15 < _list14.Count; ++_i15)
                                {
                                    string _elem16;
                                    _elem16 = await iprot.ReadStringAsync(cancellationToken);

                                    Str_col.Add(_elem16);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.List)
                        {
                            {
                                TList _list17 = await iprot.ReadListBeginAsync(cancellationToken);

                                Arr_col = new List <TColumn>(_list17.Count);
                                for (int _i18 = 0; _i18 < _list17.Count; ++_i18)
                                {
                                    TColumn _elem19;
                                    _elem19 = new TColumn();
                                    await _elem19.ReadAsync(iprot, cancellationToken);

                                    Arr_col.Add(_elem19);
                                }
                                await iprot.ReadListEndAsync(cancellationToken);
                            }
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    default:
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);

                        break;
                    }

                    await iprot.ReadFieldEndAsync(cancellationToken);
                }

                await iprot.ReadStructEndAsync(cancellationToken);
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }