Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Enlistment.cs
Go to the documentation of this file.
1namespace System.Transactions;
2
3public class Enlistment
4{
6
8
9 internal Enlistment(InternalEnlistment internalEnlistment)
10 {
11 _internalEnlistment = internalEnlistment;
12 }
13
14 internal Enlistment(Guid resourceManagerIdentifier, InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction)
15 {
16 _internalEnlistment = new DurableInternalEnlistment(this, resourceManagerIdentifier, transaction, twoPhaseNotifications, singlePhaseNotifications, atomicTransaction);
17 }
18
19 internal Enlistment(InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction, EnlistmentOptions enlistmentOptions)
20 {
21 if ((enlistmentOptions & EnlistmentOptions.EnlistDuringPrepareRequired) != 0)
22 {
23 _internalEnlistment = new InternalEnlistment(this, transaction, twoPhaseNotifications, singlePhaseNotifications, atomicTransaction);
24 }
25 else
26 {
27 _internalEnlistment = new Phase1VolatileEnlistment(this, transaction, twoPhaseNotifications, singlePhaseNotifications, atomicTransaction);
28 }
29 }
30
31 internal Enlistment(InternalTransaction transaction, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
32 {
33 _internalEnlistment = new PromotableInternalEnlistment(this, transaction, promotableSinglePhaseNotification, atomicTransaction);
34 }
35
36 internal Enlistment(IEnlistmentNotification twoPhaseNotifications, InternalTransaction transaction, Transaction atomicTransaction)
37 {
38 _internalEnlistment = new InternalEnlistment(this, twoPhaseNotifications, transaction, atomicTransaction);
39 }
40
41 internal Enlistment(IEnlistmentNotification twoPhaseNotifications, object syncRoot)
42 {
43 _internalEnlistment = new RecoveringInternalEnlistment(this, twoPhaseNotifications, syncRoot);
44 }
45
46 public void Done()
47 {
49 if (log.IsEnabled())
50 {
51 log.MethodEnter(TraceSourceType.TraceSourceLtm, this, "Done");
53 }
55 {
57 }
58 if (log.IsEnabled())
59 {
60 log.MethodExit(TraceSourceType.TraceSourceLtm, this, "Done");
61 }
62 }
63}
virtual void EnlistmentDone(InternalEnlistment enlistment)
Enlistment(InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction, EnlistmentOptions enlistmentOptions)
Definition Enlistment.cs:19
Enlistment(IEnlistmentNotification twoPhaseNotifications, object syncRoot)
Definition Enlistment.cs:41
Enlistment(InternalTransaction transaction, IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
Definition Enlistment.cs:31
InternalEnlistment _internalEnlistment
Definition Enlistment.cs:5
Enlistment(InternalEnlistment internalEnlistment)
Definition Enlistment.cs:9
Enlistment(Guid resourceManagerIdentifier, InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction)
Definition Enlistment.cs:14
InternalEnlistment InternalEnlistment
Definition Enlistment.cs:7
Enlistment(IEnlistmentNotification twoPhaseNotifications, InternalTransaction transaction, Transaction atomicTransaction)
Definition Enlistment.cs:36
void EnlistmentDone(InternalEnlistment enlistment)
void MethodExit(TraceSourceType traceSource, object thisOrContextObject, [CallerMemberName] string methodname=null)
static readonly TransactionsEtwProvider Log
void MethodEnter(TraceSourceType traceSource, object thisOrContextObject, [CallerMemberName] string methodname=null)