views:

646

answers:

1

I have two assemblies EDC2.DAL and EDC2 where EDC2.DaoInterfaces defines a bunch of interfaces for data access objects to objects in the EDC2.Domain namespace. These are all implemented by classes in EDC2.DAL.

So to give an example:

Assembly EDC2
  Namespace EDC2.DaoInterfaces
    ICustomerDao
    IProductDao
Assembly EDC2.DAL
  Namespace EDC2.DAL
    CustomerDao : ICustomerDao
    ProductDao : IProductDao

I would like to use Windsor's fluent interface to register all interfaces in EDC2.DaoInterfaces as being implemented by their corresponding implementors in EDC2.DAL.

Can anyone tell me how to do this?

A: 

Found the solution here:

AllTypes.Pick().FromAssemblyNamed("EDC2.DAL").If(x => !x.IsGenericType).WithService.FirstInterface()
George Mauer