Beispiel #1
0
 public TOperationHandle(THandleIdentifier operationId, TOperationType operationType, Boolean hasResultSet) : this()
 {
     OperationId   = operationId;
     OperationType = operationType;
     HasResultSet  = hasResultSet;
 }
Beispiel #2
0
        public void Read(TProtocol iprot)
        {
            var    isset_operationId   = false;
            var    isset_operationType = false;
            var    isset_hasResultSet  = false;
            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)
                    {
                        OperationId = new THandleIdentifier();
                        OperationId.Read(iprot);
                        isset_operationId = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        OperationType       = (TOperationType)iprot.ReadI32();
                        isset_operationType = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Bool)
                    {
                        HasResultSet       = iprot.ReadBool();
                        isset_hasResultSet = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Double)
                    {
                        ModifiedRowCount = iprot.ReadDouble();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
            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);
            }
        }
Beispiel #3
0
 public TSessionHandle(THandleIdentifier sessionId) : this() => SessionId = sessionId;