public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_sessionId = 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) { SessionId = new THandleIdentifier(); await SessionId.ReadAsync(iprot, cancellationToken); isset_sessionId = 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_sessionId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_operationId = false; bool isset_operationType = false; bool isset_hasResultSet = 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) { OperationId = new THandleIdentifier(); await OperationId.ReadAsync(iprot, cancellationToken); isset_operationId = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.I32) { OperationType = (TOperationType)await iprot.ReadI32Async(cancellationToken); isset_operationType = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.Bool) { HasResultSet = await iprot.ReadBoolAsync(cancellationToken); isset_hasResultSet = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.Double) { ModifiedRowCount = await iprot.ReadDoubleAsync(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_operationId) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_operationType) { throw new TProtocolException(TProtocolException.INVALID_DATA); } if (!isset_hasResultSet) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public TOperationHandle(THandleIdentifier operationId, TOperationType operationType, bool hasResultSet) : this() { this.OperationId = operationId; this.OperationType = operationType; this.HasResultSet = hasResultSet; }
public TSessionHandle(THandleIdentifier sessionId) : this() { this.SessionId = sessionId; }