ChinhDo.Transactions.TxFileManager.TxEnlistment.Rollback C# (CSharp) Метод

Rollback() публичный Метод

Notifies an enlisted object that a transaction is being rolled back (aborted).
This is typically called on a different thread from the transaction thread.
public Rollback ( Enlistment enlistment ) : void
enlistment Nexus.Transactions.Enlistment A object used to send a response to the transaction manager.
Результат void
			public void Rollback(Enlistment enlistment)
			{
				try
				{
					// Roll back journal items in reverse order
					for (int i = _journal.Count - 1; i >= 0; i--)
					{
						_journal[i].Rollback();
						_journal[i].CleanUp();
					}

					_enlisted = false;
					_journal.Clear();
				}
				catch (Exception e)
				{
					if (IgnoreExceptionsInRollback)
					{
						EventLog.WriteEntry(GetType().FullName, "Failed to rollback." + Environment.NewLine + e.ToString(), EventLogEntryType.Warning);
					}
					else
					{
						throw new TransactionException("Failed to roll back.", e);
					}
				}
				finally
				{
					_enlisted = false;
					if (_journal != null)
					{
						_journal.Clear();
					}
				}
				_enlistments.Remove(_tx.TransactionInformation.LocalIdentifier);
				enlistment.Done();
			}