Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disable setting DeferredScheduler on WinRT in a test runner

  • Loading branch information...
commit be5c861b8b2c29dd98ec5bf918eff77e618d9ec5 1 parent 67422de
@paulcbetts paulcbetts authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 ReactiveUI.Xaml/ServiceLocationRegistration.cs
View
8 ReactiveUI.Xaml/ServiceLocationRegistration.cs
@@ -37,7 +37,13 @@ public void Register()
#endif
#if WINRT
- RxApp.DeferredScheduler = System.Reactive.Concurrency.CoreDispatcherScheduler.Current;
+ if (!RxApp.InUnitTestRunner()) {
+ try {
+ RxApp.DeferredScheduler = System.Reactive.Concurrency.CoreDispatcherScheduler.Current;
+ } catch (Exception ex) {
+ throw new Exception("Core Dispatcher is null - this means you've accessed ReactiveUI too early in WinRT initialization", ex);
+ }
+ }
#elif MONO
// NB: Mono has like 37 UI Frameworks :)
#else
Please sign in to comment.
Something went wrong with that request. Please try again.