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

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

20 Examples 7

1. Example

Project: System.Data.SQLite
Source File: SQLiteTransaction.cs
protected override void Dispose(bool disposing)
		{
			try
			{
				if (disposing)
				{
					if (!m_isFinished && m_connection != null && m_connection.CurrentTransaction == this && m_connection.IsOnlyTransaction(this))
					{
						m_connection.ExecuteNonQuery(this, "ROLLBACK");
						m_connection.PopTransaction();
					}
					m_connection = null;
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}

2. Example

Project: referencesource
Source File: DbTransaction.cs
public void Dispose() {
            Dispose(true);
        }

3. Example

Project: DNTProfiler
Source File: ProfiledDbTransaction.cs
protected override void Dispose(bool disposing)
        {
            _profiler.TransactionDisposing(InnerTransaction, NHProfilerContextProvider.GetLoggedDbTransaction(InnerTransaction, _connectionId));
            if (disposing && InnerTransaction != null)
            {
                InnerTransaction.Dispose();
            }
            InnerTransaction = null;
            _connection = null;
            base.Dispose(disposing);
        }

4. Example

Project: MdxClient
Source File: MdxTransaction.cs
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {                
                if (null != _connection)
                {
                    Rollback();
                }
                _connection = null;                
            }
            base.Dispose(disposing);
        }

5. Example

Project: nanoprofiler
Source File: ProfiledDbTransaction.cs
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _transaction.Dispose();
            }

            base.Dispose(disposing);
        }

6. Example

Project: Glimpse
Source File: GlimpseDbTransaction.cs
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                InnerTransaction.Dispose();
            }

            base.Dispose(disposing);
        }

7. Example

Project: Dos.ORM
Source File: Database.cs
public void CloseConnection(DbTransaction tran)
        {
            if (tran.Connection != null)
            {
                CloseConnection(tran.Connection);
                tran.Dispose();
            }
        }

8. Example

Project: Dos.ORM
Source File: Database.cs
public void CloseConnection(DbTransaction tran)
        {
            if (tran.Connection != null)
            {
                CloseConnection(tran.Connection);
                tran.Dispose();
            }
        }

9. Example

Project: Dos.ORM
Source File: Database.cs
public void CloseConnection(DbTransaction tran)
        {
            if (tran.Connection != null)
            {
                CloseConnection(tran.Connection);
                tran.Dispose();
            }
        }

10. Example

Project: PlayoutAutomation
Source File: DbTransactionRedundant.cs
protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (disposing)
            {
                try
                {
                    _connection.ActiveTransaction = null;
                    if (_transactionPrimary != null)
                        _transactionPrimary.Dispose();
                    if (_transactionSecondary != null)
                        _transactionSecondary.Dispose();
                }
                catch { }
            }
        }

11. Example

Project: ReliableDbProvider
Source File: ReliableSqlDbTransaction.cs
protected override void Dispose(bool disposing)
        {
            _innerTransaction.Dispose();
            base.Dispose(disposing);
        }

12. Example

Project: NServiceKit
Source File: ProfiledDbTransaction.cs
protected override void Dispose(bool disposing)
        {
            if (disposing && _trans != null)
            {
                _trans.Dispose();
            }
            _trans = null;
            _conn = null;
            base.Dispose(disposing);
        }

13. Example

Project: effort
Source File: EffortTransaction.cs
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                this.systemTransaction.Dispose();
            }

            base.Dispose(disposing);
        }

14. Example

Project: EDDiscovery
Source File: SQLiteCommandED.cs
protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Close the transaction before closing the lock
                if (InnerTransaction != null)
                {
                    InnerTransaction.Dispose();
                    InnerTransaction = null;
                }

                if (_transactionLock != null)
                {
                    _transactionLock.CloseWriter();
                }
            }

            base.Dispose(disposing);
        }

15. Example

Project: Dos.ORM
Source File: DbTrans.cs
public void Close()
        {
            if (isClose)
                return;

            if (!isCommitOrRollback)
            {
                isCommitOrRollback = true;

                trans.Rollback();
            }

            if (conn.State != ConnectionState.Closed)
            {
                conn.Close();
            }

            trans.Dispose();

            isClose = true;
        }

16. Example

Project: Dos.ORM
Source File: DbTrans.cs
public void Close()
        {
            if (isClose)
                return;

            if (!isCommitOrRollback)
            {
                isCommitOrRollback = true;

                trans.Rollback();
            }

            if (conn.State != ConnectionState.Closed)
            {
                conn.Close();
            }

            trans.Dispose();

            isClose = true;
        }

17. Example

Project: Dos.ORM
Source File: DbTrans.cs
public void Close()
        {
            if (isClose)
                return;

            if (!isCommitOrRollback)
            {
                isCommitOrRollback = true;

                trans.Rollback();
            }

            if (conn.State != ConnectionState.Closed)
            {
                conn.Close();
            }

            trans.Dispose();

            isClose = true;
        }

18. Example

Project: MimeKit
Source File: SQLiteTransaction.cs
protected override void Dispose(bool disposing)
    {
      if (disposing)
      {
        lock (this)
        {
          if (IsValid(false))
            Rollback();

          _cnn = null;
        }
      }
      base.Dispose(disposing);
    }

19. Example

Project: revenj
Source File: NpgsqlTransaction.cs
protected override void Dispose(bool disposing)
		{
			if (disposing && this._conn != null)
			{
				if (_conn.Connector.Transaction != null)
				{
					if ((Thread.CurrentThread.ThreadState & (ThreadState.Aborted | ThreadState.AbortRequested)) != 0)
					{
						// can't count on Rollback working if the thread has been aborted
						// need to copy since Cancel will set it to null
						NpgsqlConnection conn = _conn;
						Cancel();
						// must close connection since transaction hasn't been rolled back
						conn.Close();
					}
					else
					{
						this.Rollback();
					}
				}

				this._disposed = true;
			}
			base.Dispose(disposing);
		}

20. Example

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