views:

257

answers:

1

i have a winforms applicatoin that has a lot of implementations of IOrderDataLoader. Other teams are starting to build their own new implementations of IOrderDataLoader. So we switched our app to look in a directories of Dlls and load all classes that implement IOrderDataLoader using reflection. This way other groups can deploy their dlls on their own and the main app loads them on demand.

The problem is one of the implementations that we have as an internal project that we are trying to move out into its own deployment has a number of dependencies. How i do i break this out and load it up with all the dependencies? All the other data loader have empty constructors so i simply just loop . .

+2  A: 

Try looking at the Managed Extensibility Framework. It is a framework for doing what you've already done, and supports dependency injection in the style you request.

Bryan Watts