System.Type instances have a GetConstructor() method which returns a System.Reflection.ConstructorInfo object. ConstructorInfo instances have a GetParameters() method which returns an array of ParameterInfo objects. Some of the properties on the ParameterInfo object are:
Name:string ParameterType:Type Position:int --- Clinton Begin <[EMAIL PROTECTED]> wrote: > Wow, I gotta read the docs. :-) > > BTW: What's the "argumentName" attribute for? Can C# introspect on > the > argument names? > > Cheers, > Clinton > > > On 7/17/06, Ron Grabowski <[EMAIL PROTECTED]> wrote: > > > > DataMapper 1.5 supports this notation (IBATISNET-155): > > > > <resultMap id="account-result-constructor" class="Account" > > > <constructor> > > <argument argumentName="id" column="Account_ID"/> > > <argument argumentName="firstName" column="Account_FirstName"/> > > <argument argumentName="lastName" column="Account_LastName"/> > > </constructor> > > </resultMap> > > > > --- Clinton Begin <[EMAIL PROTECTED]> wrote: > > > > > In Java land I was thinking of simply adding the following to the > > > current > > > <result> element... > > > > > > Currently we can do: > > > > > > <result property="FirstName" column="FIRST_NAME" /> > > > > > > I'd like to add... > > > > > > <result field="_firstName" column="FIRST_NAME"/> <!-- I'm > not > > > advocating underscores --> > > > > > > ...and... > > > > > > <result column="FIRST_NAME" /> > > > > > > The latter (which lacks both property and field attributes) would > be > > > a > > > constructor parameter. It would have to follow some rules: > > > > > > 1) Constructor results must come first in the result map > defn. > > > 2) Constructor results must be in the same order as the > > > parameters of > > > the constructor. > > > > > > I think constructor and field support would be awesome in both > the > > > .NET and > > > Java versions. > > > > > > Thoughts? > > > > > > Clinton > > >

