private void Dispose(bool disposing)
{
if (disposing)
{
GC.SuppressFinalize(this);
}
// We need to remove the entry for the transaction from the static
// LightweightTransactionManager.PromotedTransactionTable.
Hashtable promotedTransactionTable = TransactionManager.PromotedTransactionTable;
lock (promotedTransactionTable)
{
WeakReference weakRef = (WeakReference)promotedTransactionTable[_identifier];
if (null != weakRef)
{
if (weakRef.Target != null)
{
weakRef.Target = null;
}
}
promotedTransactionTable.Remove(_identifier);
}
}
FinalizedObject::Dispose ( ) : void |
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(); } }