/// <summary> /// Creates a new wrapped <see cref="IDbTransaction"/> /// </summary> public SimpleProfiledTransaction(IDbTransaction transaction, SimpleProfiledConnection connection) { if (transaction == null) throw new ArgumentNullException("transaction"); if (connection == null) throw new ArgumentNullException("connection"); _transaction = transaction; _connection = connection; }
/// <summary> /// Initialises a new instance of the <see cref="SimpleProfiledTransaction"/> class. /// Creates a new wrapped <see cref="IDbTransaction"/> /// </summary> /// <param name="transaction"> /// The transaction to wrap /// </param> /// <param name="connection"> /// The wrapped connection this transaction is attached to /// </param> public SimpleProfiledTransaction(IDbTransaction transaction, SimpleProfiledConnection connection) { if (transaction == null) { throw new ArgumentNullException("transaction"); } if (connection == null) { throw new ArgumentNullException("connection"); } _transaction = transaction; _connection = connection; }
/// <summary> /// Creates a new wrapped <see cref="IDbTransaction"/> /// </summary> /// <param name="transaction">The transaction to wrap.</param> /// <param name="connection">The already-wrapped connection.</param> /// <exception cref="ArgumentNullException">Throws when the <paramref name="transaction"/> or <paramref name="connection"/> is <c>null</c>.</exception> public SimpleProfiledTransaction(IDbTransaction transaction, SimpleProfiledConnection connection) { WrappedTransaction = transaction ?? throw new ArgumentNullException(nameof(transaction)); _connection = connection ?? throw new ArgumentNullException(nameof(connection)); }