Exemplo n.º 1
0
        private static void TimerCallback(object state)
        {
            if (!(state is TransactionScope scope))
            {
                TransactionsEtwProvider etwLog = TransactionsEtwProvider.Log;
                if (etwLog.IsEnabled())
                {
                    etwLog.TransactionScopeInternalError("TransactionScopeTimerObjectInvalid");
                }

                throw TransactionException.Create(TraceSourceType.TraceSourceBase, SR.InternalError + SR.TransactionScopeTimerObjectInvalid, null);
            }

            scope.Timeout();
        }