Permalink
Browse files

Disable setting DeferredScheduler on WinRT in a test runner

  • Loading branch information...
1 parent 67422de commit be5c861b8b2c29dd98ec5bf918eff77e618d9ec5 @paulcbetts paulcbetts committed Dec 27, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 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

0 comments on commit be5c861

Please sign in to comment.