Created
April 26, 2012 13:57
-
-
Save emiaj/2499808 to your computer and use it in GitHub Desktop.
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
| var foo = new ObjectDef(typeof(Foo)); // you can also target a value instead of a type (new Foo()) | |
| foo.DependencyByType(typeof(IBar), typeof(Bar)); // by type | |
| foo.DependencyByValue(typeof(IBaz), new Baz()); // by value | |
| Services(x => | |
| { | |
| x.AddService(typeof(IFoo), foo); | |
| }); |
Author
Uhmm, in that case you need to walk through the services. I think it accepts a visitor so you can evaluate the plugin graph by yourself, but the rules dictating if is or if is not a valid plugin would be up to you.
If you also want to check that in your live app, you can also use an activator, just take in the BehaviorGraph which is IoC enabled in fubu and do the same check you do in your tests.
You probably are better asking this to JDM, he may give you a proper advice ;)
Ok, thanks for your help!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would that work in a test assembly? I mean, without the full bootstrapping. What it has is just:
So, if I even add an IActivator, would it be.. activated?