Nito.AsyncEx.SynchronizationContextSwitcher
Utility class for temporarily switching SynchronizationContext implementations.
Initializes a new instance of the SynchronizationContextSwitcher class, installing the new SynchronizationContext.
Executes a synchronous delegate without the current SynchronizationContext. The current context is restored when this function returns.
Executes a synchronous or asynchronous delegate without the current SynchronizationContext. The current context is restored when this function synchronously returns.