System.Threading.HostExecutionContextManager.HostExecutionContextSwitcher.HostExecutionContextSwitcher C# (CSharp) Method

HostExecutionContextSwitcher() public method

public HostExecutionContextSwitcher ( HostExecutionContext currentContext )
currentContext HostExecutionContext
            public HostExecutionContextSwitcher(HostExecutionContext currentContext)
            {
                _currentContext = currentContext;

                // Tie this instance with the current execution context for Revert validation (it must fail if an incompatible
                // execution context is applied to the thread)
                _asyncLocal = new AsyncLocal<bool>();
                _asyncLocal.Value = true;
            }
HostExecutionContextManager.HostExecutionContextSwitcher