public void InitializeCM() { UiTaskHandler.RegisterCommand = (command, action) => { // ThrownExceptions does not listen to Subscribe errors, but only in async task errors! command.ThrownExceptions .Select(x => ErrorHandlerr.HandleException(x, action)) .SelectMany(UserErrorHandler.HandleUserError) .Where(x => x == RecoveryOptionResultModel.RetryOperation) .ObserveOn(RxApp.MainThreadScheduler) .InvokeCommand(command); }; RxApp.SupportsRangeNotifications = false; // WPF doesnt :/ SimpleInjectorContainerExtensions.RegisterReserved(typeof(IHandle), typeof(IScreen)); SimpleInjectorContainerExtensions.RegisterReservedRoot(typeof(IHandle)); }
public void ConfigureCM() { RxApp.SupportsRangeNotifications = false; // WPF doesnt :/ SimpleInjectorContainerExtensions.RegisterReserved(typeof(IHandle), typeof(IScreen)); SimpleInjectorContainerExtensions.RegisterReservedRoot(typeof(IHandle)); UiTaskHandler.RegisterCommand = (command, action) => { // ThrownExceptions does not listen to Subscribe errors, but only in async task errors! command.ThrownExceptions .Select(x => ErrorHandlerr.HandleException(x, action)) .SelectMany(UserErrorHandler.HandleUserError) .Where(x => x == RecoveryOptionResultModel.RetryOperation) .ObserveOn(RxApp.MainThreadScheduler) .InvokeCommand(command); }; SetupViewNamespaces(); var mutableDependencyResolver = Locator.CurrentMutable; SetupRx(mutableDependencyResolver); }