Rollback() public method

Rolls back our current transaction and closes the transaction.
public Rollback ( ) : void
return void
        public void Rollback(SinglePhaseEnlistment singlePhaseEnlistment)
        {
            // we receive a commit message
            // if we own a local transaction, then commit that transaction
            if (_transaction != null)
            {
                _transaction.Rollback();
                _transaction = null;
            }
            else if (_transactionId > 0)
            {
                GetResourceManager().RollbackTransaction(_transactionId);
            }
            singlePhaseEnlistment.Aborted();

            _enlistedInTransactions.Remove(Transaction.Current);
        }
 public void ShouldNotBeAbleToRollbackAfterCommit()
 {
     var transaction = new Neo4jTransaction(new GraphClient(new Uri("http://foo/db/data")));
     transaction.Commit();
     transaction.Rollback();
 }
 public void ShouldNotBeAbleToRollbackTwice()
 {
     var transaction = new Neo4jTransaction(new GraphClient(new Uri("http://foo/db/data")));
     transaction.Rollback();
     Assert.That(() => transaction.Rollback(), Throws.TypeOf<ClosedTransactionException>());
 }