System.Data.Common.DbDataReader.Dispose(bool)

Here are the examples of the csharp api class System.Data.Common.DbDataReader.Dispose(bool) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

25 Examples 7

1. Example

Project: referencesource
Source File: DbDataReader.cs
View license
[
        EditorBrowsableAttribute(EditorBrowsableState.Never)
        ]
        public void Dispose() {
            Dispose(true);
        }

2. Example

Project: revenj
Source File: NpgsqlDataReader.cs
View license
protected override void Dispose(bool disposing)
		{
			base.Dispose(disposing);
		}

3. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing && null != reader)
            {
                reader.Dispose();
                reader = null;
            }
            base.Dispose(disposing);
        }

4. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing && null != reader)
            {
                reader.Dispose();
                reader = null;
            }
            base.Dispose(disposing);
        }

5. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing && null != reader)
            {
                reader.Dispose();
                reader = null;
            }
            base.Dispose(disposing);
        }

6. Example

View license
protected override void Dispose(bool disposing)
        {
            if (disposing && null != reader)
            {
                reader.Dispose();
                reader = null;
            }
            base.Dispose(disposing);
        }

7. Example

View license
public void Dispose()
        {
            if (!_disposed)
            {
                this.DbDataReader.Dispose();
                _disposed = true;
            }
        }

8. Example

View license
protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

9. Example

Project: effort
Source File: EffortDataReader.cs
View license
protected override void Dispose(bool disposing)
        {
            // The Dispose method of the base class invokes Close method
            base.Dispose(disposing);
        }

10. Example

Project: AntData.ORM
Source File: DataReaderAsync.cs
View license
public void Dispose()
		{
			if (Reader != null)
				Reader.Dispose();
		}

11. Example

Project: MdxClient
Source File: MdxDataReader.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                Close();               
            }

            base.Dispose(disposing);
        }

12. Example

Project: Glimpse
Source File: GlimpseDbDataReader.cs
View license
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                InnerDataReader.Dispose();
            }

            base.Dispose(disposing);
        }

13. Example

View license
protected override void Dispose(bool disposing)
        {
            Logger.LogPerformanceCounter(
                "SpannerDataReader.ActiveCount",
                () => Interlocked.Decrement(ref s_readerCount));

            _resultSet?.Dispose();
            _connectionToClose?.Close();
            _txToClose?.Dispose();
            base.Dispose(disposing);
        }

14. Example

Project: nuodb-dotnet
Source File: NuoDbDataReader.cs
View license
protected override void Dispose(bool disposing)
        {
#if DEBUG
            System.Diagnostics.Trace.WriteLine("NuoDbDataReader::Dispose()");
#endif
            Close();
            base.Dispose(disposing);
        }

15. Example

Project: SmartStoreNET
Source File: CachingDataReader.cs
View license
protected override void Dispose(bool disposing)
		{
			// base.Dispose() will call Close()
			base.Dispose(disposing);

			_resultRowsEnumerator.Dispose();

			_state = State.Disposed;
		}

16. Example

Project: Spreads
Source File: ObjectReader.cs
View license
protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing) Shutdown();
        }

17. Example

View license
protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing)
            {
                _reader.Dispose();
                _command.Dispose();
            }
        }

18. Example

View license
protected override void Dispose(bool disposing)
    {
      GC.SuppressFinalize(this);
      if (disposing)
        reader.Dispose();
      base.Dispose(disposing);
    }

19. Example

View license
protected override void Dispose(bool disposing)
        {
            if (!_disposed)
            {
/n ..... /n //View Source file for more details /n }

20. Example

Project: referencesource
Source File: SqlCommand.cs
View license
public override Task<object> ExecuteScalarAsync(CancellationToken cancellationToken)
        {/n ..... /n //View Source file for more details /n }

21. Example

View license
[Obsolete("Retrieving binaries as a stream will be removed from the next version of DD4T")]
        public System.IO.Stream GetBinaryStreamByUrl(string url)
        {
            SqlReaderStream stream = null;
            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand(SqlQuery, cn);
                cmd.Parameters.Add("@url", SqlDbType.VarChar, 255); // note: the length of the URL parameter must equal the length of the BINARY_VARIANT.PATH column in the broker database
                cmd.Parameters["@url"].Value = url;
                cn.Open();
                //CommandBehavior.SequentialAccess avoids loading the entire BLOB in-memory.
                SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
                if (false == reader.Read())
                {
                    reader.Dispose();
                    return null;
                }
                stream = new SqlReaderStream(reader, 0);
            }
            return stream;
        }

22. Example

View license
[Obsolete("Retrieving binaries as a stream will be removed from the next version of DD4T")]
        public System.IO.Stream GetBinaryStreamByUrl(string url)
        {
            SqlReaderStream stream = null;
            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand(SqlQuery, cn);
                cmd.Parameters.Add("@url", SqlDbType.VarChar, 255); // note: the length of the URL parameter must equal the length of the BINARY_VARIANT.PATH column in the broker database
                cmd.Parameters["@url"].Value = url;
                cn.Open();
                //CommandBehavior.SequentialAccess avoids loading the entire BLOB in-memory.
                SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
                if (false == reader.Read())
                {
                    reader.Dispose();
                    return null;
                }
                stream = new SqlReaderStream(reader, 0);
            }
            return stream;
        }

23. Example

View license
[Obsolete("Retrieving binaries as a stream will be removed from the next version of DD4T")]
        public System.IO.Stream GetBinaryStreamByUrl(string url)
        {
            SqlReaderStream stream = null;
            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand(SqlQuery, cn);
                cmd.Parameters.Add("@url", SqlDbType.VarChar, 255); // note: the length of the URL parameter must equal the length of the BINARY_VARIANT.PATH column in the broker database
                cmd.Parameters["@url"].Value = url;
                cn.Open();
                //CommandBehavior.SequentialAccess avoids loading the entire BLOB in-memory.
                SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
                if (false == reader.Read())
                {
                    reader.Dispose();
                    return null;
                }
                stream = new SqlReaderStream(reader, 0);
            }
            return stream;
        }

24. Example

View license
[Obsolete("Retrieving binaries as a stream will be removed from the next version of DD4T")]
        public System.IO.Stream GetBinaryStreamByUrl(string url)
        {
            SqlReaderStream stream = null;
            using (SqlConnection cn = new SqlConnection(ConnectionString))
            {
                SqlCommand cmd = new SqlCommand(SqlQuery, cn);
                cmd.Parameters.Add("@url", SqlDbType.VarChar, 255); // note: the length of the URL parameter must equal the length of the BINARY_VARIANT.PATH column in the broker database
                cmd.Parameters["@url"].Value = url;
                cn.Open();
                //CommandBehavior.SequentialAccess avoids loading the entire BLOB in-memory.
                SqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
                if (false == reader.Read())
                {
                    reader.Dispose();
                    return null;
                }
                stream = new SqlReaderStream(reader, 0);
            }
            return stream;
        }

25. Example

Project: ALinq
Source File: AccessDbConnection.cs
View license
protected override void Dispose(bool disposing)
        {
            source.Dispose();
            base.Dispose(disposing);
        }