Nito.AsyncEx.SynchronizationContextSwitcher
Utility class for temporarily switching SynchronizationContext implementations.
namespace Nito.AsyncEx
{
public sealed class SynchronizationContextSwitcher
{
public static void NoContext(Action action);
public static T NoContext<[System.Runtime.CompilerServices.Nullable(2)] T>(Func<T> action);
public static void ApplyContext(SynchronizationContext context, Action action);
public static T ApplyContext<[System.Runtime.CompilerServices.Nullable(2)] T>(SynchronizationContext context, Func<T> action);
}
}