Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TransactionStateDelegatedBase.cs
Go to the documentation of this file.
3
4namespace System.Transactions;
5
7{
8 internal override void EnterState(InternalTransaction tx)
9 {
10 if (tx._outcomeSource._isoLevel == IsolationLevel.Snapshot)
11 {
13 }
15 DistributedTransaction distributedTransaction = null;
16 try
17 {
18 if (tx._durableEnlistment != null)
19 {
21 if (log.IsEnabled())
22 {
24 }
25 }
26 distributedTransaction = TransactionState.TransactionStatePSPEOperation.PSPEPromote(tx);
27 }
28 catch (TransactionPromotionException innerException)
29 {
32 if (log2.IsEnabled())
33 {
35 }
36 }
37 finally
38 {
39 if (distributedTransaction == null)
40 {
42 }
43 }
44 if (distributedTransaction != null && tx.PromotedTransaction != distributedTransaction)
45 {
46 tx.PromotedTransaction = distributedTransaction;
47 Hashtable promotedTransactionTable = TransactionManager.PromotedTransactionTable;
48 lock (promotedTransactionTable)
49 {
50 tx._finalizedObject = new FinalizedObject(tx, tx.PromotedTransaction.Identifier);
51 WeakReference value = new WeakReference(tx._outcomeSource, trackResurrection: false);
52 promotedTransactionTable[tx.PromotedTransaction.Identifier] = value;
53 }
56 if (log3.IsEnabled())
57 {
58 log3.TransactionPromoted(tx.TransactionTraceId, distributedTransaction.TransactionTraceId);
59 }
61 }
62 }
63}
static string CannotPromoteSnapshot
Definition SR.cs:20
Definition SR.cs:7
TransactionTraceIdentifier TransactionTraceId
static Exception CreateInvalidOperationException(TraceSourceType traceSource, string message, Exception innerException)
static void FireDistributedTransactionStarted(Transaction transaction)
virtual void PromoteEnlistmentsAndOutcome(InternalTransaction tx)
virtual void ChangeStateAbortedDuringPromotion(InternalTransaction tx)
static TransactionStatePSPEOperation TransactionStatePSPEOperation
void CommonEnterState(InternalTransaction tx)
void EnlistmentStatus(InternalEnlistment enlistment, NotificationCall notificationCall)
void ExceptionConsumed(TraceSourceType traceSource, Exception exception)
void TransactionPromoted(TransactionTraceIdentifier transactionID, TransactionTraceIdentifier distributedTxID)
static readonly TransactionsEtwProvider Log
static readonly Guid Empty
Definition Guid.cs:86