Beispiel #1
0
        public bool Read([CanBeNull] out byte[] result)
        {
            Contract.Assert(_inByteaMode != false);
            if (!_inByteaMode.HasValue)
            {
                if (_byteaHandler == null)
                {
                    throw new NpgsqlException("Bytea handler was not found during initialization of PostGIS handler");
                }
                _inByteaMode = true;

                _byteaHandler.PrepareRead(_readBuf, _len);
            }

            Contract.Assert(_byteaHandler != null);
            return(_byteaHandler.Read(out result));
        }
 ValueTask <byte[]> IChunkingTypeHandler <byte[]> .Read(ReadBuffer buf, int len, bool async, FieldDescription fieldDescription)
 {
     Debug.Assert(_byteaHandler != null);
     return(_byteaHandler.Read(buf, len, async, fieldDescription));
 }