auto-registration

How To Get Automatic Registration With Castle Windsor

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...

castle windsor auto registration from two different assembly?

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...

Castle Windsor: Find an implementing assembly and used it.

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...

Can you add a dependency to a Castle component that was auto-registered?

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...