Inheriting Validators for DependencyInjection

Posts   
 
    
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 21-Mar-2008 12:43:14   

Hi All,

I've got the following situation:

We have a common database structure (including, customers, orders, products, etc.. generic stuff) + llblgen project & resulting data project which we reuse for all kinds of projects over and over gain. We also use dependency injection for different Validation options.

But now for 1 certain project I need to add certain project specific functionality to the ProductValidator (which inherits from our own GenericValidator).

So I have normally have: GenericProject.Injectables.ProductValidator : GenericValidator

And in my Web.config:


    <dependencyInjectionInformation>
        <additionalAssemblies>
            <assembly filename="GenericProject.Injectables.dll"/>
        </additionalAssemblies>
        <instanceTypeFilters>
            <instanceTypeFilter namespace="GenericProject"/>
        </instanceTypeFilters>
    </dependencyInjectionInformation>

Now I would like to add an assembly (SpecificProject.Injectables) to this configuration. This SpecificProject.Injectables.dll contains 1 validator which inherits from GenericProject.Injectables.ProductValidator.

My question is, is this possible? This would result in have 2 Product validators, one in each Assembly.

What's the solution for this?

I have no idea where to start...

thanks,

Gab

gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 21-Mar-2008 12:51:42   

Sorry... just looking into Dependency Injection scopes now..

Think that's it!