Nito.AsyncEx.SynchronizationContextSwitcher
Utility class for temporarily switching SynchronizationContext implementations.
namespace Nito.AsyncEx
{
public sealed class SynchronizationContextSwitcher
{
public SynchronizationContextSwitcher(SynchronizationContext newContext);
public static void NoContext(Action action);
public static Task NoContextAsync(Func<Task> action);
}
}