[Mono-dev] [patch] Fixing the «crazy inheritance chain walking» for parameters custom attributes

Jb Evain jb at nurv.fr
Tue Dec 1 19:30:52 EST 2009


Hey,

When using the static methods Attribute.IsDefined or
Attribute.GetCustomAttributes on a ParameterInfo that is defined on a
virtual method, those methods are supposed to be walking the
inheritance chain to collect the attributes over the different
parameter definitions.

This patch adds support for this behavior. So far, we were only
dealing with the parameters defined on the current parameter. Now I
simply added a new internal method GetBaseMethod on MethodInfo that am
using to walk down the hierarchy.

Please review.

-- 
Jb Evain  <jb at nurv.fr>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unit_tests.diff
Type: text/x-patch
Size: 4004 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091202/e254d22c/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: metadata.diff
Type: text/x-patch
Size: 2344 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091202/e254d22c/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: corlib.diff
Type: text/x-patch
Size: 5921 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20091202/e254d22c/attachment-0005.bin 


More information about the Mono-devel-list mailing list