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 an asynchronous delegate without the current SynchronizationContext. The current context is restored when this function returns its task.