internal static void DistributedTransactionOutcome(InternalTransaction tx, TransactionStatus status) { FinalizedObject finalizedObject = null; lock (tx) { if (tx.innerException == null) { tx.innerException = tx.PromotedTransaction.InnerException; } switch (status) { case TransactionStatus.Committed: tx.State.ChangeStatePromotedCommitted(tx); break; case TransactionStatus.Aborted: tx.State.ChangeStatePromotedAborted(tx); break; case TransactionStatus.InDoubt: tx.State.InDoubtFromDtc(tx); break; default: TransactionException.CreateInvalidOperationException(System.Transactions.SR.GetString("TraceSourceLtm"), "", null); break; } finalizedObject = tx.finalizedObject; } if (finalizedObject != null) { finalizedObject.Dispose(); } }
internal static void DistributedTransactionOutcome(InternalTransaction tx, TransactionStatus status) { FinalizedObject fo = null; lock ( tx ) { if (null == tx.innerException) { tx.innerException = tx.PromotedTransaction.InnerException; } switch (status) { case TransactionStatus.Committed: { tx.State.ChangeStatePromotedCommitted(tx); break; } case TransactionStatus.Aborted: { tx.State.ChangeStatePromotedAborted(tx); break; } case TransactionStatus.InDoubt: { tx.State.InDoubtFromDtc(tx); break; } default: { Debug.Assert(false, "InternalTransaction.DistributedTransactionOutcome - Unexpected TransactionStatus"); TransactionException.CreateInvalidOperationException(SR.GetString(SR.TraceSourceLtm), "", null, tx.DistributedTxId ); break; } } fo = tx.finalizedObject; } if (null != fo) { fo.Dispose(); } }
internal static void DistributedTransactionOutcome(InternalTransaction tx, TransactionStatus status) { FinalizedObject?fo = null; lock (tx) { if (null == tx._innerException) { Debug.Assert(tx.PromotedTransaction != null); tx._innerException = tx.PromotedTransaction.InnerException; } Debug.Assert(tx.State ! != null); switch (status) { case TransactionStatus.Committed: { tx.State.ChangeStatePromotedCommitted(tx); break; } case TransactionStatus.Aborted: { tx.State.ChangeStatePromotedAborted(tx); break; } case TransactionStatus.InDoubt: { tx.State.InDoubtFromDtc(tx); break; } default: { Debug.Fail("InternalTransaction.DistributedTransactionOutcome - Unexpected TransactionStatus"); TransactionException.CreateInvalidOperationException(TraceSourceType.TraceSourceLtm, "", null, tx.DistributedTxId ); break; } } fo = tx._finalizedObject; } fo?.Dispose(); }
internal static void DistributedTransactionOutcome(InternalTransaction tx, TransactionStatus status) { FinalizedObject finalizedObject = null; lock (tx) { if (tx.innerException == null) { tx.innerException = tx.PromotedTransaction.InnerException; } switch (status) { case TransactionStatus.Committed: tx.State.ChangeStatePromotedCommitted(tx); break; case TransactionStatus.Aborted: tx.State.ChangeStatePromotedAborted(tx); break; case TransactionStatus.InDoubt: tx.State.InDoubtFromDtc(tx); break; default: TransactionException.CreateInvalidOperationException(System.Transactions.SR.GetString("TraceSourceLtm"), "", null); break; } finalizedObject = tx.finalizedObject; } if (finalizedObject != null) { finalizedObject.Dispose(); } }