示例#1
0
        /// <summary>
        /// Determines whether the current record is empty.
        /// A record is considered empty if all fields are empty.
        /// </summary>
        /// <param name="checkHasBeenRead">True to check if the record
        /// has been read, otherwise false.</param>
        /// <returns>
        ///   <c>true</c> if [is record empty]; otherwise, <c>false</c>.
        /// </returns>
        protected virtual bool IsRecordEmpty(bool checkHasBeenRead)
        {
            CheckDisposed();
            if (checkHasBeenRead)
            {
                CheckHasBeenRead();
            }

            if (currentRecord == null)
            {
                return(false);
            }

#if NET_2_0
            return(EnumerableHelper.All(currentRecord, string.IsNullOrEmpty));
#else
            return(currentRecord.All(string.IsNullOrEmpty));
#endif
        }