Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PromoteEnlistmentsAndOutcome()

virtual void System.Transactions.TransactionStatePromoted.PromoteEnlistmentsAndOutcome ( InternalTransaction tx)
inlinepackagevirtual

Definition at line 100 of file TransactionStatePromoted.cs.

101 {
102 bool flag = false;
103 tx.PromotedTransaction.RealTransaction.InternalTransaction = tx;
104 try
105 {
106 flag = PromotePhaseVolatiles(tx, ref tx._phase0Volatiles, phase0: true);
107 }
108 catch (TransactionException innerException)
109 {
110 TransactionException exception = (TransactionException)(tx._innerException = innerException);
111 TransactionsEtwProvider log = TransactionsEtwProvider.Log;
112 if (log.IsEnabled())
113 {
114 log.ExceptionConsumed(exception);
115 }
116 return;
117 }
118 finally
119 {
120 if (!flag)
121 {
122 tx.PromotedTransaction.Rollback();
123 tx.State.ChangeStateAbortedDuringPromotion(tx);
124 }
125 }
126 flag = false;
127 try
128 {
129 flag = PromotePhaseVolatiles(tx, ref tx._phase1Volatiles, phase0: false);
130 }
131 catch (TransactionException innerException2)
132 {
133 TransactionException exception2 = (TransactionException)(tx._innerException = innerException2);
134 TransactionsEtwProvider log2 = TransactionsEtwProvider.Log;
135 if (log2.IsEnabled())
136 {
137 log2.ExceptionConsumed(exception2);
138 }
139 return;
140 }
141 finally
142 {
143 if (!flag)
144 {
145 tx.PromotedTransaction.Rollback();
146 tx.State.ChangeStateAbortedDuringPromotion(tx);
147 }
148 }
149 flag = false;
150 try
151 {
152 flag = PromoteDurable(tx);
153 }
154 catch (TransactionException innerException3)
155 {
156 TransactionException exception3 = (TransactionException)(tx._innerException = innerException3);
157 TransactionsEtwProvider log3 = TransactionsEtwProvider.Log;
158 if (log3.IsEnabled())
159 {
160 log3.ExceptionConsumed(exception3);
161 }
162 }
163 finally
164 {
165 if (!flag)
166 {
167 tx.PromotedTransaction.Rollback();
168 tx.State.ChangeStateAbortedDuringPromotion(tx);
169 }
170 }
171 }
virtual bool PromoteDurable(InternalTransaction tx)
bool PromotePhaseVolatiles(InternalTransaction tx, ref VolatileEnlistmentSet volatiles, bool phase0)

References System.Transactions.InternalTransaction._innerException, System.Transactions.InternalTransaction._phase0Volatiles, System.Transactions.InternalTransaction._phase1Volatiles, System.Transactions.TransactionState.ChangeStateAbortedDuringPromotion(), System.exception, System.Transactions.TransactionsEtwProvider.ExceptionConsumed(), System.Diagnostics.Tracing.EventSource.IsEnabled(), System.Transactions.TransactionsEtwProvider.Log, System.Transactions.InternalTransaction.PromotedTransaction, System.Transactions.TransactionStatePromoted.PromoteDurable(), System.Transactions.TransactionStatePromoted.PromotePhaseVolatiles(), System.Transactions.Distributed.DistributedTransaction.Rollback(), System.Transactions.InternalTransaction.State, and System.Transactions.TransactionException.

Referenced by System.Transactions.TransactionStateDelegatedBase.EnterState(), and System.Transactions.TransactionStatePromoted.EnterState().