I have a generic interface, IValidator. I want to be able to use StructureMap to retrieve a list of all classes that implement IValidator for a given type T. For example,
var PersonValidators = ObjectFactory.GetAllInstances<IValidator<Person>>();
var AddressValidators = ObjectFactory.GetAllInstances<IValidator<Address>>();
I know how to retrieve ALL classes that implement IValidator but I need to filter it by the type of the type parameter.
Can anyone give me any guidance or suggestions?
Thanks.