public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_status = false;
                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.Struct)
                        {
                            Status = new TStatus();
                            await Status.ReadAsync(iprot, cancellationToken);

                            isset_status = true;
                        }
                        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);

                if (!isset_status)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Пример #2
0
 public TGetTablesResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #3
0
 public TGetFunctionsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #4
0
 public TGetSchemasResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #5
0
 public TGetColumnsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #6
0
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_status = false;
                bool   isset_serverProtocolVersion = false;
                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.Struct)
                        {
                            Status = new TStatus();
                            await Status.ReadAsync(iprot, cancellationToken);

                            isset_status = true;
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I32)
                        {
                            ServerProtocolVersion = (TProtocolVersion)await iprot.ReadI32Async(cancellationToken);

                            isset_serverProtocolVersion = true;
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.Struct)
                        {
                            SessionHandle = new TSessionHandle();
                            await SessionHandle.ReadAsync(iprot, cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.Map)
                        {
                            {
                                TMap _map76 = await iprot.ReadMapBeginAsync(cancellationToken);

                                Configuration = new Dictionary <string, string>(_map76.Count);
                                for (int _i77 = 0; _i77 < _map76.Count; ++_i77)
                                {
                                    string _key78;
                                    string _val79;
                                    _key78 = await iprot.ReadStringAsync(cancellationToken);

                                    _val79 = await iprot.ReadStringAsync(cancellationToken);

                                    Configuration[_key78] = _val79;
                                }
                                await iprot.ReadMapEndAsync(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);

                if (!isset_status)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
                if (!isset_serverProtocolVersion)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
Пример #7
0
 public TGetDelegationTokenResp(TStatus status) : this()
 {
     this.Status = status;
 }
 public TCloseOperationResp(TStatus status) : this()
 {
     this.Status = status;
 }
 public TGetOperationStatusResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #10
0
 public TExecuteStatementResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #11
0
 public TCloseSessionResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #12
0
 public TGetPrimaryKeysResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #13
0
 public TFetchResultsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #14
0
 public TGetCatalogsResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #15
0
 public TGetInfoResp(TStatus status, TGetInfoValue infoValue) : this()
 {
     this.Status    = status;
     this.InfoValue = infoValue;
 }
Пример #16
0
 public TCancelOperationResp(TStatus status) : this()
 {
     this.Status = status;
 }
        public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken)
        {
            iprot.IncrementRecursionDepth();
            try
            {
                bool   isset_status = false;
                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.Struct)
                        {
                            Status = new TStatus();
                            await Status.ReadAsync(iprot, cancellationToken);

                            isset_status = true;
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 2:
                        if (field.Type == TType.I32)
                        {
                            OperationState = (TOperationState)await iprot.ReadI32Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 3:
                        if (field.Type == TType.String)
                        {
                            SqlState = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 4:
                        if (field.Type == TType.I32)
                        {
                            ErrorCode = await iprot.ReadI32Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 5:
                        if (field.Type == TType.String)
                        {
                            ErrorMessage = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 6:
                        if (field.Type == TType.String)
                        {
                            TaskStatus = await iprot.ReadStringAsync(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 7:
                        if (field.Type == TType.I64)
                        {
                            OperationStarted = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

                    case 8:
                        if (field.Type == TType.I64)
                        {
                            OperationCompleted = await iprot.ReadI64Async(cancellationToken);
                        }
                        else
                        {
                            await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                        }
                        break;

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

                    case 10:
                        if (field.Type == TType.Struct)
                        {
                            ProgressUpdateResponse = new TProgressUpdateResp();
                            await ProgressUpdateResponse.ReadAsync(iprot, 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);

                if (!isset_status)
                {
                    throw new TProtocolException(TProtocolException.INVALID_DATA);
                }
            }
            finally
            {
                iprot.DecrementRecursionDepth();
            }
        }
 public TGetCrossReferenceResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #19
0
 public TGetTypeInfoResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #20
0
 public TGetResultSetMetadataResp(TStatus status) : this()
 {
     this.Status = status;
 }
Пример #21
0
 public TOpenSessionResp(TStatus status, TProtocolVersion serverProtocolVersion) : this()
 {
     this.Status = status;
     this.ServerProtocolVersion = serverProtocolVersion;
 }