Permalink
Browse files

Resolves issue #209

Exit early in RoutedViewHost when in Design Mode.
Added "XDESPROC.EXE" (VS2012 Design Mode) to RxApp list of design
environments.
Also fixed an issue in RxApp where checking for design mode was testing
against full path of assembly instead of just the assembly name.
  • Loading branch information...
1 parent 2e9205d commit 983337463c7f1b0d71e56fb164cf29d7430d5705 @jordansjones jordansjones committed Mar 20, 2013
Showing with 4 additions and 1 deletion.
  1. +2 −0 ReactiveUI.Routing/RoutedViewHost.cs
  2. +2 −1 ReactiveUI/RxApp.cs
@@ -52,6 +52,8 @@ public RoutedViewHost()
HorizontalContentAlignment = HorizontalAlignment.Stretch;
VerticalContentAlignment = VerticalAlignment.Stretch;
+ if (RxApp.InUnitTestRunner()) return;
+
this.WhenAny(x => x.Router.NavigationStack, x => x.Value)
.SelectMany(x => x.CollectionCountChanged.StartWith(x.Count).Select(_ => x.LastOrDefault()))
.Subscribe(vm => {
View
@@ -476,7 +476,7 @@ public static bool InUnitTestRunner(string[] testAssemblies, string[] designEnvi
// without access to any WPF references :-/
var entry = Assembly.GetEntryAssembly();
if (entry != null) {
- var exeName = entry.Location.ToUpperInvariant();
+ var exeName = (new FileInfo(entry.Location)).Name.ToUpperInvariant();
if (designEnvironments.Any(x => x.Contains(exeName))) {
return true;
@@ -510,6 +510,7 @@ public static bool InUnitTestRunner()
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
+ "XDESPROC.EXE",
};
return InUnitTestRunner(testAssemblies, designEnvironments);

0 comments on commit 9833374

Please sign in to comment.