System.Transactions.TransactionScope.CommonInitialize C# (CSharp) Method

CommonInitialize() private method

private CommonInitialize ( ) : void
return void
        private void CommonInitialize()
        {
            ContextKey = new ContextKey();
            _complete = false;
            _dependentTransaction = null;
            _disposed = false;
            _committableTransaction = null;
            _expectedCurrent = null;
            _scopeTimer = null;
            _scopeThread = Thread.CurrentThread;

            Transaction.GetCurrentTransactionAndScope(
                            AsyncFlowEnabled ? TxLookup.DefaultCallContext : TxLookup.DefaultTLS,
                            out _savedCurrent,
                            out _savedCurrentScope,
                            out _contextTransaction
                            );

            // Calling validate here as we need to make sure the existing parent ambient transaction scope is already looked up to see if we have ES interop enabled.
            ValidateAsyncFlowOptionAndESInteropOption();
        }