static private CreateInvalidOperationException ( TraceSourceType traceSource, string message, Exception innerException, Guid distributedTxId ) : Exception | ||
traceSource | TraceSourceType | |
message | string | |
innerException | Exception | |
distributedTxId | Guid | |
return | Exception |
internal static Exception CreateInvalidOperationException(TraceSourceType traceSource, string message, Exception innerException, Guid distributedTxId)
{
string messagewithTxId = message;
if (IncludeDistributedTxId(distributedTxId))
messagewithTxId = string.Format(SR.DistributedTxIDInTransactionException, messagewithTxId, distributedTxId);
return CreateInvalidOperationException(traceSource, messagewithTxId, innerException);
}
TransactionException::CreateInvalidOperationException ( TraceSourceType traceSource, string message, Exception innerException ) : Exception |
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(); } }