Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
InternalEnlistment.cs
Go to the documentation of this file.
4
5namespace System.Transactions;
6
8{
10
12
14
16
18
20
21 private readonly int _enlistmentId;
22
23 private readonly Enlistment _enlistment;
24
26
28
30
32 {
33 get
34 {
35 Guid result = Guid.Empty;
36 if (Transaction != null)
37 {
39 }
40 return result;
41 }
42 }
43
44 internal EnlistmentState State
45 {
46 get
47 {
48 return _twoPhaseState;
49 }
50 set
51 {
53 }
54 }
55
57
59 {
60 get
61 {
62 if (_preparingEnlistment == null)
63 {
65 }
67 }
68 }
69
71 {
72 get
73 {
74 if (_singlePhaseEnlistment == null)
75 {
77 }
79 }
80 }
81
83
84 internal virtual object SyncRoot => _transaction;
85
87
89
91 {
92 get
93 {
94 throw new NotImplementedException();
95 }
96 }
97
99 {
100 get
101 {
102 return _promotedEnlistment;
103 }
104 set
105 {
107 }
108 }
109
111 {
112 get
113 {
115 {
116 lock (SyncRoot)
117 {
119 {
120 EnlistmentTraceIdentifier traceIdentifier;
121 if (null != _atomicTransaction)
122 {
124 }
125 else
126 {
127 Guid empty = Guid.Empty;
129 DefaultInterpolatedStringHandler handler = new DefaultInterpolatedStringHandler(0, 2, invariantCulture);
132 traceIdentifier = new EnlistmentTraceIdentifier(empty, new TransactionTraceIdentifier(string.Create(invariantCulture, ref handler), 0), _enlistmentId);
133 }
135 _traceIdentifier = traceIdentifier;
136 }
137 }
138 }
139 return _traceIdentifier;
140 }
141 }
142
144 {
145 get
146 {
147 throw new NotImplementedException();
148 }
149 }
150
151 protected InternalEnlistment(Enlistment enlistment, IEnlistmentNotification twoPhaseNotifications)
152 {
153 _enlistment = enlistment;
154 _twoPhaseNotifications = twoPhaseNotifications;
155 _enlistmentId = 1;
157 }
158
159 protected InternalEnlistment(Enlistment enlistment, InternalTransaction transaction, Transaction atomicTransaction)
160 {
161 _enlistment = enlistment;
162 _transaction = transaction;
163 _atomicTransaction = atomicTransaction;
164 _enlistmentId = transaction._enlistmentCount++;
166 }
167
168 internal InternalEnlistment(Enlistment enlistment, InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction)
169 {
170 _enlistment = enlistment;
171 _transaction = transaction;
172 _twoPhaseNotifications = twoPhaseNotifications;
173 _singlePhaseNotifications = singlePhaseNotifications;
174 _atomicTransaction = atomicTransaction;
175 _enlistmentId = transaction._enlistmentCount++;
177 }
178
179 internal InternalEnlistment(Enlistment enlistment, IEnlistmentNotification twoPhaseNotifications, InternalTransaction transaction, Transaction atomicTransaction)
180 {
181 _enlistment = enlistment;
182 _twoPhaseNotifications = twoPhaseNotifications;
183 _transaction = transaction;
184 _atomicTransaction = atomicTransaction;
185 }
186
187 internal virtual void FinishEnlistment()
188 {
189 Transaction._phase0Volatiles._preparedVolatileEnlistments++;
191 }
192
193 internal virtual void CheckComplete()
194 {
195 if (Transaction._phase0Volatiles._preparedVolatileEnlistments == Transaction._phase0VolatileWaveCount + Transaction._phase0Volatiles._dependentClones)
196 {
197 Transaction.State.Phase0VolatilePrepareDone(Transaction);
198 }
199 }
200}
static CultureInfo InvariantCulture
static int Increment(ref int location)
InternalEnlistment(Enlistment enlistment, IEnlistmentNotification twoPhaseNotifications, InternalTransaction transaction, Transaction atomicTransaction)
InternalEnlistment(Enlistment enlistment, InternalTransaction transaction, Transaction atomicTransaction)
ISinglePhaseNotification _singlePhaseNotifications
EnlistmentTraceIdentifier EnlistmentTraceId
IEnlistmentNotification EnlistmentNotification
EnlistmentTraceIdentifier _traceIdentifier
InternalEnlistment(Enlistment enlistment, IEnlistmentNotification twoPhaseNotifications)
IEnlistmentNotification _twoPhaseNotifications
virtual IPromotableSinglePhaseNotification PromotableSinglePhaseNotification
InternalEnlistment(Enlistment enlistment, InternalTransaction transaction, IEnlistmentNotification twoPhaseNotifications, ISinglePhaseNotification singlePhaseNotifications, Transaction atomicTransaction)
ISinglePhaseNotification SinglePhaseNotification
TransactionTraceIdentifier TransactionTraceId
static readonly Guid Empty
Definition Guid.cs:86