I am using structuremap in my project. To inject different implementation of a repository, I want to have a switch in app.config which changes all real implementation of a repository to a mock repositories.
Lets say IRepository has two implementations RealRepository and MockRepository
ForRequestedType() .TheDefaultIsConcreteType();
I want to have a switch in app.config / web.config say (Mock=1), which changes all real repositories implementation to
ForRequestedType() .TheDefaultIsConcreteType();
I don't want to write whole plugin definition in app.config, just want one switch, how do I implement this?