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;
}