public static Transaction GetTransactionFromDtcTransaction(IDtcTransaction transactionNative)
{
if (null == transactionNative)
{
throw new ArgumentNullException(nameof(transactionNative));
}
TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
if (etwLog.IsEnabled())
{
etwLog.MethodEnter(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetTransactionFromDtcTransaction");
}
Transaction transaction = DistributedTransactionManager.GetTransactionFromDtcTransaction(transactionNative);
if (etwLog.IsEnabled())
{
etwLog.MethodExit(TraceSourceType.TraceSourceDistributed, "TransactionInterop.GetTransactionFromDtcTransaction");
}
return transaction;
}