public NpgsqlParameterStatus(Stream stream)
 {
     //Read message length
     PGUtil.EatStreamBytes(stream, 4);
     Parameter      = PGUtil.ReadString(stream);
     ParameterValue = PGUtil.ReadString(stream);
 }
Exemplo n.º 2
0
        public NpgsqlBackEndKeyData(Stream stream)
        {
            // Read the BackendKeyData message contents. Two Int32 integers = 8 Bytes.
            // For protocol version 3.0 they are three integers. The first one is just the size of message
            // so, just read it.
            PGUtil.EatStreamBytes(stream, 4);

            ProcessID = PGUtil.ReadInt32(stream);
            SecretKey = PGUtil.ReadInt32(stream);
        }
Exemplo n.º 3
0
        protected override void SkipOne()
        {
            int fieldSize = GetThisFieldCount();

            if (fieldSize >= _messageSize)
            {
                AbandonShip();
            }
            _nextFieldSize = null;
            PGUtil.EatStreamBytes(Stream, fieldSize);
        }
Exemplo n.º 4
0
 public override void Dispose()
 {
     if (_rowDesc == null)
     {
         // If _rowdesc is null, then only the message length integer has been read;
         // read the entire message and disgard it.
         PGUtil.EatStreamBytes(Stream, this._messageSize - 4);
     }
     else
     {
         CurrentStreamer = null;
         Skip(_rowDesc.NumFields - _currentField - 1);
     }
 }
Exemplo n.º 5
0
 public void Dispose()
 {
     PGUtil.EatStreamBytes(_stream, _remainingBytes);
 }
Exemplo n.º 6
0
 private int ReadNumFields(Stream stream)
 {
     PGUtil.EatStreamBytes(stream, 4);
     return(PGUtil.ReadInt16(stream));
 }