public static void OnChange <T>(this IFluxViewFor <T> view, Action <T> callback) where T : Store { var appDispatcher = Locator.Current.GetService <Dispatcher>(); if (appDispatcher == null) { // TODO: we should fail the app return; } var lazyStore = new Lazy <T>(() => Locator.Current.GetService <T>()); appDispatcher.Register <ChangePayload>(payload => callback(lazyStore.Value)); // lol hiding the hax away view.EmitChange(); }
public void EmitChangeShouldDoNothing() { _view.EmitChange(); Assert.IsNull(((TestView)_view).TestResult); }