コード例 #1
0
 /// <summary>
 /// dispose the transaction and connection.
 /// </summary>
 /// <param name="disposing">false if being called from a <c>finalizer</c></param>
 protected override void Dispose(bool disposing)
 {
     if (disposing && _transaction != null)
     {
         _transaction.Dispose();
     }
     _transaction = null;
     _connection  = null;
     base.Dispose(disposing);
 }
コード例 #2
0
 /// <summary>
 /// Initialises a new instance of the <see cref="ProfiledDbTransaction"/> class.
 /// </summary>
 /// <param name="transaction">The transaction.</param>
 /// <param name="connection">The connection.</param>
 public ProfiledDbTransaction(DbTransaction transaction, ProfiledDbConnection connection)
 {
     if (transaction == null)
     {
         throw new ArgumentNullException("transaction");
     }
     if (connection == null)
     {
         throw new ArgumentNullException("connection");
     }
     _transaction = transaction;
     _connection  = connection;
 }