Nexus.Transactions.TransactionScope.TransactionScope C# (CSharp) Method

TransactionScope() public method

The default constructor.
This sets up the ambient transaction. This class allows the sharing of a transaction across multiple threads. However, it is expected that all threads created in the scope of the TransactionScope will have finished their work before Complete() is called. If a thread does work after Complete() has been called, expecting to enroll in the same transaction, the behaviour is undefined.
public TransactionScope ( ) : System
return System
		public TransactionScope()
		{
			if (Transaction.Current == null)
			{
				Transaction.Current = new Transaction();
				m_booOwnsTransaction = true;
			}
			m_trnTransaction = Transaction.Current;
			if (m_trnTransaction.TransactionInformation.Status == TransactionStatus.Aborted)
				throw new TransactionAbortedException("Cannot create a new transaction scope with an aborted transaction.");
		}