Created
April 21, 2015 14:14
-
-
Save jmarnold/9462a4804b984514ca94 to your computer and use it in GitHub Desktop.
Can't find the behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestFixture] | |
public class what_the_heck | |
{ | |
[Test] | |
public void debug() | |
{ | |
AppStartFubuMVC.Start(); | |
var route = RouteTable | |
.Routes | |
.OfType<Route>() | |
.Single(x => x.Url == ""); | |
var invoker = route.RouteHandler.As<FubuRouteHandler>().Invoker.As<BehaviorInvoker>(); | |
var chain = (BehaviorChain) typeof (BehaviorInvoker) | |
.GetField("_chain", BindingFlags.Instance | BindingFlags.NonPublic) | |
.GetValue(invoker); | |
var instanceRef = ObjectFactory.Container.Model.AllInstances.Single(x => x.Name == chain.UniqueId.ToString()); | |
Debug.WriteLine(instanceRef); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment