[Mono-list] Adding missing Attributes to System.Web

Paolo Molaro lupus@ximian.com
Wed, 12 Jun 2002 13:17:48 +0200


On 06/12/02 Nick Drochak wrote:
> | Extra credit goes to the person that can work out how to derive the
> | parameters of an attribution via reflection (I don't think it can be
> | done). In my book, this is a gap in the reflecction API.
> |
> | If you can, let me know how, and I'll add it to corcompare.
> 
> My thought was to recursively drill down the attribute's properties (with
> GetProperties(bindingFlags)) and get the values for the properties that are
> "basic" types, i.e. ints, strings, etc.
> 
> Is this too naive?

There may be no field or property that represents the the cnstructor
argument and it may be tricky anyway to match the positional arguments
with the field they are stored in.

	monodis --customattr assembly

will decode the custom attribute constructor signature and the
arguments: it may help some.

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better