I recently read Ayende's blog post on automatic registration working with XML Configuration. I would like to do exactly what he does, but his code snippet doesn't work for me. The Register method doesn't exist on my container object.
Here's his code:
var container = new WindsorContainer(new XmlInterpreter());
container.Register(
Al...
container.Register(
AllTypes.Pick().FromAssembly(typeof (UserRepository).Assembly)
.WithService.FirstInterface());
Currently the code above will work fine if the interface are also in the same assembly but it will blow up if IUserRepository is from a different assembly.
Is auto registration from two different a...
How do I tell castle to pick up an interface implementation from the assemblies in the executing directory.
E.g.
How do I tell castle to find an implementation for ILog and then If I drop log4net among the assemblies in the executing directory, it should pick it and use it. Tomorrow if I decide to change log4net to Nlog it should pick...
I generally use StructureMap, but on a current project I'm using Castle Windsor (2.1). I've found some code to auto-register types and interfaces:
_container.Register(AllTypes.Pick().FromAssembly(GetType().Assembly).WithService.FirstInterface());
However I would like to add a string dependency to one of the types. I can do this witho...