Done() public method

Marks the enlistmant as having finished.
public Done ( ) : void
return void
			/// <summary>
			/// Used to notify an enlisted resource manager that the transaction is being rolled back.
			/// </summary>
			/// <param name="p_eltEnlistment">The enlistment class used to communicate with the resource manager.</param>
			public void Rollback(Enlistment p_eltEnlistment)
			{
				m_booEnlisted = false;
				m_amrModKeys.Clear();
				m_dicInstalledFiles.Clear();
				m_dicInstalledIniEdits.Clear();
				m_dicInstalledGameSpecificValueEdits.Clear();
				m_dicEnlistments.Remove(CurrentTransaction.TransactionInformation.LocalIdentifier);
				p_eltEnlistment.Done();
			}
			/// <summary>
			/// Used to notify an enlisted resource manager that the transaction is being committed.
			/// </summary>
			/// <param name="p_eltEnlistment">The enlistment class used to communicate with the resource manager.</param>
			public void Commit(Enlistment p_eltEnlistment)
			{
				try
				{
					Commit();
					m_dicEnlistments.Remove(CurrentTransaction.TransactionInformation.LocalIdentifier);
					p_eltEnlistment.Done();
				}
				catch (Exception e)
				{
					throw new TransactionException("Problem whilst committing Install Log.", e);
				}
			}
			/// <summary>
			/// Used to notify an enlisted resource manager that the transaction is being committed.
			/// </summary>
			/// <param name="p_eltEnlistment">The enlistment class used to communicate with the resource manager.</param>
			public void Commit(Enlistment p_eltEnlistment)
			{
				Commit();
				m_dicEnlistments.Remove(CurrentTransaction.TransactionInformation.LocalIdentifier);
				p_eltEnlistment.Done();
			}
			/// <summary>
			/// Used to notify an enlisted resource manager that the transaction is being rolled back.
			/// </summary>
			/// <param name="p_eltEnlistment">The enlistment class used to communicate with the resource manager.</param>
			public void Rollback(Enlistment p_eltEnlistment)
			{
				m_booEnlisted = false;
				m_setManagedPlugins.Clear();
				m_setRemovedPlugins.Clear();
				m_dicEnlistments.Remove(CurrentTransaction.TransactionInformation.LocalIdentifier);
				p_eltEnlistment.Done();
			}
コード例 #5
0
			/// <summary>
			/// Notifies an enlisted object that a transaction is being rolled back (aborted).
			/// </summary>
			/// <param name="enlistment">A <see cref="T:System.Transactions.Enlistment"></see> object used to send a response to the transaction manager.</param>
			/// <remarks>This is typically called on a different thread from the transaction thread.</remarks>
			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();
			}
コード例 #6
0
			public void Commit(Enlistment enlistment)
			{
				for (int i = 0; i < _journal.Count; i++)
				{
					_journal[i].CleanUp();
				}

				_enlisted = false;
				_journal.Clear();
				_enlistments.Remove(_tx.TransactionInformation.LocalIdentifier);
				enlistment.Done();
			}