[Mono-devel-list] NET_2_0 attributes

Marek Safar marek.safar at seznam.cz
Tue Sep 14 08:29:30 EDT 2004


Hello Sebastien,

>+	* MonoCustomAttrs.cs: Implemented NET_2_0 extension.
>+        Attributes are returned also for pseudo attributes.
>
>...
>
>+		[MonoTODO ("Missing MarshalAsAttribute")]
>
>...
>
>+		[MonoTODO ("Missing MarshalAsAttribute, FieldOffsetAttribute")]
>
>...
>
>+		[MonoTODO ("A lot of work here")]
>+		object ReconstructDllImportAttribute ()
>
>This seems to be a *partial* implementation to
>http://bugzilla.ximian.com/show_bug.cgi?id=62372
>and that should be noted in the ChangeLog
>  
>

Oh, I didn't know about this bug report.
No problem I can add comments to the ChangeLog.

>The bug entry links to a full list of the pseudo attributes
>http://blogs.msdn.com/adam_nathan/archive/2003/04/29/56645.aspx
>  
>

Mm, but sorry I don't like to implement something according to someone blog.
I implemented pseudo attributes listed in section 20.2.1 of  ECMA spec. 
And tried to test it with Microsoft .NET v2.0.40607.

And when you try to get pseudo security attributes or even 
System.Reflection.Assembly* attributes you will see that Microsoft 
doesn't do it.
Maybe it is bug or feature ;-)

>Can you send to the list which attributes are (and aren't) supported by your
>patch ?
>  
>
I didn't implement attributes that need to change or extend metadata 
API. They all have the MonoTODO attribute.
I also didn't implement ComImportAttribute but I am not sure it it makes 
sense. But it is no problem to add it.

>
>When I looked at this issue, also hoping for a managed-side fix, I was
>pretty sure that we couldn't get a complete implementation from the managed
>side (after reading the MSDN blog). At least not without (a) modifying the
>currently used runtime icalls or (b) adding new icalls in the runtime. I
>don't think that, both for performance and for understanbility, that we want
>to split the attribute gathering in both the runtime and the class library.
>
>Sebastien Pouliot
>home: spouliot at videotron.ca
>blog: http://pages.infinit.net/ctech/poupou.html
>
>
>-----Original Message-----
>From: mono-devel-list-admin at lists.ximian.com
>[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Marek Safar
>Sent: 14 septembre 2004 05:59
>To: mono-devel-list at lists.ximian.com
>Subject: [Mono-devel-list] NET_2_0 attributes
>
>
>Hello,
>
>I implemented transformation from pseudo attributes to normal attributes
>as Microsoft changed it for NET_2_0.
>
>Could someone review my patch?
>
>Thanks,
>
>  
>
Marek




More information about the Mono-devel-list mailing list