Resolving types using SimpleIoc

May 23, 2016 at 10:03 PM
Edited May 23, 2016 at 11:09 PM
Hello all,

This is not a bug so much as a feature request. If this is in the wrong place I apologize. This question/feature request pertains to SimpleIoc.

Currently in SimpleIoc you use the following line of code to register a type.



SimpleIoc.Default.Register<IModuleRegistryService, ModuleRegistryService>();

This has worked great for me so far with no issues. However, I am now trying to automatically register certain types within my project based on certain things falling into place with that type. Unfortunately it would seem SimpleIoc does not support registering just System.Type types. If that makes any since. Aka I need to do something like this:



SimpleIoc.Default.Register(typeof(IModuleRegistryService), typeof(ModuleRegistryService));

I found a work around here which I would rather not use:

I have also researched using other Ioc containers and I really like SimpleIoc and use it extensively in my projects so I would rather not switch if I do not have to.

Would it be possible to add this functionality into SimpleIoc?


P.S I would also need to be able to resolve them with a type.