/// <summary>Closes the IDataReader Object.</summary>
 public override void Close()
 {
     // reader can be null when we're not profiling, but we've inherited from ProfiledDbCommand and are returning a
     // an unwrapped reader from the base command
     WrappedReader?.Close();
     _profiler?.ReaderFinish(this);
 }
 void Close()
 {
     // this can occur when we're not profiling, but we've inherited from ProfiledDbCommand and are returning a
     // an unwrapped reader from the base command
     reader?.Close();
     profiler?.ReaderFinish(this);
 }
Exemple #3
0
        /// <summary>Closes the <see cref="T:System.Data.Common.DbDataReader" /> object.</summary>
        public override void Close()
        {
            // this can occur when we're not profiling, but we've inherited from ProfiledDbCommand and are returning a
            // an unwrapped reader from the base command
            if (_reader != null)
            {
                _reader.Close();
            }

            if (_profiler != null)
            {
                _profiler.ReaderFinish(this);
            }
        }
        void Close()
        {
            // this can occur when we're not profiling, but we've inherited from ProfiledDbCommand and are returning a
            // an unwrapped reader from the base command
            if (_reader != null)
            {
#if NETSTANDARD1_3
                _reader.Dispose();
#else
                _reader.Close();
#endif
            }

            if (_profiler != null)
            {
                _profiler.ReaderFinish(this);
            }
        }
Exemple #5
0
 public void ReaderFinish(IDataReader reader)
 {
     _sw.Stop();
     _wrapped?.ReaderFinish(reader);
 }
 public void ReaderFinish(IDataReader reader)
 {
     _wrapped.ReaderFinish(reader);
 }