I'm just wondering if there is a DI Framework for .net that handles string-to-some type conversion for me?
Basically I have this constructor:
public MyImplTwo(bool someParam)
and a string like "true" or "1". I've tried Unity, but this throws an error saying that no constructor with the signature MyImplTwo(string) exists:
container.RegisterType<MyImplBase, MyImplTwo>(new InjectionConstructor(new object[] {"true"}));
Is there one? Essentially I mainly need a wrapper around Activator.CreateInstance, so I'm looking for the simplest IoC that works. On the other hand, I wouldn't mind the extra functionality of the "big" containers as long as the above works.
Edit: I can get the desired type as a string as well, and if required also the argumentName. The things I cannot do is a) have a container-specific config file (configuration is done through a database) and b) decorate the classes that should be resolved with any attributes as I don't control them.