Example #1
0
        /// <inheritdoc/>
        public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
        {
            if (_isClosed)
            {
                throw new InvalidOperationException(string.Format("Invalid attempt to call {0} when reader is closed.",
                                                                  "GetChars"));
            }
            IObjectRecord record = Current;

            if (record == null)
            {
                throw new InvalidOperationException("Invalid attempt to read when no data is present.");
            }

            return(record.GetChars(i, fieldoffset, buffer, bufferoffset, length));
        }
Example #2
0
        /// <inheritdoc/>
        public bool IsDBNull(int i)
        {
            if (_isClosed)
            {
                throw new InvalidOperationException(string.Format("Invalid attempt to call {0} when reader is closed.",
                                                                  "IsDBNull"));
            }
            IObjectRecord record = Current;

            if (record == null)
            {
                throw new InvalidOperationException("Invalid attempt to read when no data is present.");
            }

            return(record.IsDBNull(i));
        }
Example #3
0
        /// <inheritdoc/>
        public int GetValues(object[] values)
        {
            if (_isClosed)
            {
                throw new InvalidOperationException(string.Format("Invalid attempt to call {0} when reader is closed.",
                                                                  "GetValues"));
            }

            IObjectRecord record = Current;

            if (record == null)
            {
                throw new InvalidOperationException("Invalid attempt to read when no data is present.");
            }

            return(record.GetValues(values));
        }