New test.
[mono.git] / mcs / class / System.Transactions / System.Transactions / SinglePhaseEnlistment.cs
1 //
2 // SinglePhaseEnlistment.cs
3 //
4 // Author:
5 //      Atsushi Enomoto  <atsushi@ximian.com>
6 //      Ankit Jain       <JAnkit@novell.com>
7 //
8 // (C)2005 Novell Inc,
9 // (C)2006 Novell Inc,
10 //
11
12 #if NET_2_0
13
14 namespace System.Transactions
15 {
16         public class SinglePhaseEnlistment : Enlistment
17         {
18                 bool committed = false;
19                 Transaction tx;
20                 ISinglePhaseNotification enlisted;
21                 
22                 internal SinglePhaseEnlistment (Transaction tx, ISinglePhaseNotification enlisted)
23                 {
24                         this.tx = tx;
25                         this.enlisted = enlisted;
26                 }
27
28                 [MonoTODO]
29                 public void Aborted ()
30                 {
31                         Aborted (null);
32                 }
33
34                 [MonoTODO]
35                 public void Aborted (Exception e)
36                 {
37                         tx.Rollback (e, enlisted);
38                 }
39
40                 [MonoTODO]
41                 public void Committed ()
42                 {
43                         /* FIXME */
44                         committed = true;
45                 }
46
47                 [MonoTODO]
48                 public void InDoubt ()
49                 {
50                         throw new NotImplementedException ();
51                 }
52
53                 [MonoTODO]
54                 public void InDoubt (Exception e)
55                 {
56                         throw new NotImplementedException ();
57                 }
58         }
59 }
60
61 #endif