Class RxApp
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
The main registration point for common class instances throughout a ReactiveUI application.
- Inheritance
-
Rx
App
Remarks
N.B. Why we have this evil global class In a WPF or UWP application, most commands must have the Dispatcher scheduler set, because notifications will end up being run on another thread; this happens most often in a CanExecute observable.Unfortunately, in a Unit Test framework, while the MS Test Unit runner will set the Dispatcher (so we can't even use the lack of its presence to determine whether we're in a test runner or not), none of the items queued to it will ever be executed during the unit test. Initially, I tried to plumb the ability to set the scheduler throughout the classes, but when you start building applications on top of that, having to have *every single * class have a default Scheduler property is really irritating, with either default making life difficult. This class also initializes a whole bunch of other stuff, including the IoC container, logging and error handling.
Fields
BigCacheLimit
The size of a large cache of items. Often used for the MemoizingMRUCache class.
Field Value
SmallCacheLimit
The size of a small cache of items. Often used for the MemoizingMRUCache class.
Field Value
Properties
DefaultExceptionHandler
Gets or sets the Observer which signaled whenever an object that has a ThrownExceptions property doesn't Subscribe to that Observable. Use Observer.Create to set up what will happen - the default is to crash the application with an error message.
Property Value
MainThreadScheduler
Gets or sets a scheduler used to schedule work items that should be run "on the UI thread". In normal mode, this will be DispatcherScheduler, and in Unit Test mode this will be Immediate, to simplify writing common unit tests.
Property Value
- IScheduler
SuppressViewCommandBindingMessage
Gets or sets a value indicating whether log messages should be suppressed for command bindings in the view.
Property Value
SuspensionHost
Gets or sets the current SuspensionHost, a class which provides events for process lifetime events, especially on mobile devices.
Property Value
TaskpoolScheduler
Gets or sets the a the scheduler used to schedule work items to run in a background thread. In both modes, this will run on the TPL Task Pool.
Property Value
- IScheduler