Files
linux-packaging-mono/mcs/class/System.Transactions/System.Transactions/SinglePhaseEnlistment.cs
Jo Shields 3c1f479b9d Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
2015-04-07 09:35:12 +01:00

65 lines
1.2 KiB
C#

//
// SinglePhaseEnlistment.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
// Ankit Jain <JAnkit@novell.com>
//
// (C)2005 Novell Inc,
// (C)2006 Novell Inc,
//
namespace System.Transactions
{
public class SinglePhaseEnlistment : Enlistment
{
// bool committed;
Transaction tx;
object abortingEnlisted;
/// <summary>
/// The empty ctor is used only for enlistments passed to resource managers when rolling back a transaction that
/// has already been aborted by another resource manager; no need to retrigger (another) rollback.
/// </summary>
internal SinglePhaseEnlistment () {}
internal SinglePhaseEnlistment (Transaction tx, object abortingEnlisted)
{
this.tx = tx;
this.abortingEnlisted = abortingEnlisted;
}
public void Aborted ()
{
Aborted (null);
}
public void Aborted (Exception e)
{
if (tx != null)
tx.Rollback (e, abortingEnlisted);
}
[MonoTODO]
public void Committed ()
{
/* FIXME */
// committed = true;
}
[MonoTODO ("Not implemented")]
public void InDoubt ()
{
throw new NotImplementedException ();
}
[MonoTODO ("Not implemented")]
public void InDoubt (Exception e)
{
throw new NotImplementedException ();
}
}
}