There is currently a method for retrieving a particular constructor for a type when the parameter types are known such as:
Type.GetConstructor(Type[] types)
I would like to see two things implemented. First, Type.GetConstructors() should return ConstructorInfo for all constructors for the type. Second, ConstructorInfo does not currently implement the "GetParameters" method but it would be nice if it did.
I'd like to create a (very) simple dependency injection tool for Micro framework, but this is extremely difficult to do without these two minor additions to the framework. If I was able to resolve all the constructors for a type, and request the parameters types for each constructor, I would be able to build such a tool.


JanKucera wrote Nov 25, 2011 at 2:27 PM

Agree. And ContructorInfo.GetParameters would get added with http://netmf.codeplex.com/workitem/1186 as it derives from MethodBase.

jeffdoolittle wrote Nov 25, 2011 at 6:01 PM

Thanks Jan, spread the word. I'd really like to see this get done. Please vote up people!

sevagd wrote Feb 8, 2012 at 7:54 PM

GetParameters would be useful. To overcome this limitation we implemented a simple setter/field based dependency injection container for a current project.

jeffdoolittle wrote Jan 9, 2013 at 3:42 PM

I am curious if any progress has been made toward getting this issue resolved.

lorenzte wrote Jan 9, 2013 at 5:21 PM

None so far, we will consider for next version.