public static void Invoke(Func<Task> action) { var helper = new SyncContextHelper(); var task = helper._dispatcher.Invoke(action); task.Wait(); helper.Dispose(); }
public static void Invoke(Action action) { var helper = new SyncContextHelper(); helper._dispatcher.Invoke(action); helper.Dispose(); }