2005-03-11 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Fri, 11 Mar 2005 20:25:21 +0000 (20:25 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Fri, 11 Mar 2005 20:25:21 +0000 (20:25 -0000)
* mono-api-info.exe: Don't process attributes inheriting from
SecurityAttribute as we won't ever match them 100% (at least from a
syntaxic point of view). The tool permview.exe can be used to extract
and compare them if/when required.

svn path=/trunk/mcs/; revision=41716

mcs/tools/corcompare/ChangeLog
mcs/tools/corcompare/mono-api-info.cs

index 699c73f28b28820cbe249b24bc75eeb810f220c5..d4fe58ab5b7d38515394b7438060935dbcfa4958 100644 (file)
@@ -1,3 +1,10 @@
+2005-03-11  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * mono-api-info.exe: Don't process attributes inheriting from 
+       SecurityAttribute as we won't ever match them 100% (at least from a 
+       syntaxic point of view). The tool permview.exe can be used to extract
+       and compare them if/when required.
+
 2005-02-21  Michal Moskal  <malekith@pld-linux.org>
 
        * Makefile (PROGRAM_INSTALL_DIR): Define in terms of $(libdir).
index 808f54ae2aa065818a60a93a4545b980cb7a9232..9d30c3f2d63eca2555afe98dc594fa75027dbc18 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Gonzalo Paniagua Javier (gonzalo@ximian.com)
 //
-// (C) 2003 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2003-2005 Novell, Inc (http://www.novell.com)
 //
 
 using System;
@@ -12,6 +12,7 @@ using System.Collections;
 using System.Globalization;
 using System.Reflection;
 using System.Runtime.InteropServices;
+using System.Security.Permissions;
 using System.Text;
 using System.Xml;
 
@@ -813,6 +814,13 @@ namespace Mono.AssemblyInfo
                                if (!t.IsPublic && !t.Name.EndsWith ("TODOAttribute"))
                                        continue;
 
+                               // we ignore attributes that inherit from SecurityAttribute on purpose as they:
+                               // * aren't part of GetCustomAttributes in Fx 1.0/1.1;
+                               // * are encoded differently and in a different metadata table; and
+                               // * won't ever exactly match MS implementation (from a syntax pov)
+                               if (t.IsSubclassOf (typeof (SecurityAttribute)))
+                                       continue;
+
                                XmlNode node = document.CreateElement ("attribute");
                                AddAttribute (node, "name", t.FullName);