I am using LightInject and now I need to know how to resolve a type myself. I've tried to use IServiceContainer
, but when I inject this interface into my class I get an error saying that is an unresolved dependency.
The thing I want te solve is this. At runtime I have a Type
that I need a instance from. So I want to do something like SomeResolver.GetInstance(myType)
.
How can I do this with LightInject?