This project is read-only.

Ioc Method Missing?

Mar 8, 2012 at 8:49 PM

I am definately not an IoC expert but in using the CommonLibrary.NET IoC wrapper I am wondering if an AddObject method should be added such as:

void AddObject<T>(string objName, object obj)

This would allow us to register objects like:

AddObject<IMyService>("My Service", new MyServiceClass());

Does that make sense? Or maybe I am looking at it wrong (which wouldn't be the first time).

Thanks for an awesome library!

Mar 12, 2012 at 6:28 PM


The generics based AddObject<T> method you are suggesting, as opposed to the normal AddObject(string objName, object obj ) that is already there, would seem to add a bit of convenience at registration time to guarantee that the object being registered is of that generic type. I can see a case for it and will add it to the framework.