[Mono-devel-list] [PATCH] Ignore secrutiy attributes in mono-api-diff.cs

Sebastien Pouliot sebastien at ximian.com
Thu Mar 10 08:37:16 EST 2005


Hello,

Since Oct CTP the 2.0 framework returns security attributes when a call
to GetCustomAttributes is made.

While this is nice as there was no managed API in 1.0/1.1 to get the
declarative security attributes (and I must say so since I suggested the
feature to MSDN feedback ;-) they do not belong in our class library
status page for several reasons.

* the data is incomplete
        mono-api-info only works for public type so it shows only a part
        the security attributes;

* the data may need to be different

        e.g. EnvironmentPermission may have differences because
        variables are named differently (so we need to include both
        Windows and Linux versions)
        
* performance
        We favors the use of imperative security over declarative
        security. It's faster for Mono (which isn't always true for MS);


So the results is that Mono won't ever match, from a syntax point of
view, the declarative security attributes inside MS assembly. The
attached patch simply ignores attributes that inherit from
SecurityAttribute.

Hopefully we'll match them from a functional POV over time. The tool
permview.exe can be used to extract and compare them if/when required.

Comments ?
-- 
Sebastien Pouliot  <sebastien at ximian.com>
blog: http://pages.infinit.net/ctech/poupou.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono-api-info.20050310.diff
Type: text/x-patch
Size: 1726 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050310/04a4a266/attachment.bin 


More information about the Mono-devel-list mailing list