Author: marek
Date: 2007-02-20 16:14:32 -0500 (Tue, 20 Feb 2007)
New Revision: 73217
Modified:
trunk/mcs/tools/corcompare/ChangeLog
trunk/mcs/tools/corcompare/mono-api-diff.cs
Log:
2007-02-20 Marek Safar <[EMAIL PROTECTED]>
* mono-api-diff.cs : Report difference between parameter attributes.
Modified: trunk/mcs/tools/corcompare/ChangeLog
===================================================================
--- trunk/mcs/tools/corcompare/ChangeLog 2007-02-20 21:12:43 UTC (rev
73216)
+++ trunk/mcs/tools/corcompare/ChangeLog 2007-02-20 21:14:32 UTC (rev
73217)
@@ -1,3 +1,7 @@
+2007-02-20 Marek Safar <[EMAIL PROTECTED]>
+
+ * mono-api-diff.cs : Report difference between parameter attributes.
+
2006-01-26 Atsushi Enomoto <[EMAIL PROTECTED]>
* mono-api-info.cs
Modified: trunk/mcs/tools/corcompare/mono-api-diff.cs
===================================================================
--- trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-02-20 21:12:43 UTC (rev
73216)
+++ trunk/mcs/tools/corcompare/mono-api-diff.cs 2007-02-20 21:14:32 UTC (rev
73217)
@@ -3,7 +3,8 @@
// produces a file suitable to build class status pages.
//
// Authors:
-// Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+// Gonzalo Paniagua Javier ([EMAIL PROTECTED])
+// Marek Safar ([EMAIL PROTECTED])
//
// (C) 2003 Novell, Inc (http://www.novell.com)
//
@@ -920,6 +921,7 @@
bool isUnsafe;
bool isOptional;
string defaultValue;
+ XMLAttributes attributes;
public override void LoadData (XmlNode node)
{
@@ -939,7 +941,17 @@
if (node.Attributes["optional"] != null)
isOptional = bool.Parse
(node.Attributes["optional"].Value);
if (node.Attributes["defaultValue"] != null)
- defaultValue =
node.Attributes["defaultValue"].Value;
+ defaultValue =
node.Attributes["defaultValue"].Value;
+
+ XmlNode child = node.FirstChild;
+ if (child == null)
+ return;
+
+ if (child.Name == "attributes") {
+ attributes = new XMLAttributes ();
+ attributes.LoadData (child);
+ child = child.NextSibling;
+ }
}
public override void CompareTo (XmlDocument doc, XmlNode
parent, object other)
@@ -965,6 +977,22 @@
if (defaultValue != oparm.defaultValue)
AddWarning (parent, "Parameter default value
wrong: {0} != {1}", (defaultValue == null) ? "(no default value)" :
defaultValue, (oparm.defaultValue == null) ? "(no default value)" :
oparm.defaultValue);
+
+ if (attributes != null || oparm.attributes != null) {
+ if (attributes == null)
+ attributes = new XMLAttributes ();
+
+ attributes.CompareTo (doc, parent,
oparm.attributes);
+ counters.AddPartialToPartial
(attributes.Counters);
+ if (oparm.attributes != null &&
oparm.attributes.IsTodo) {
+ counters.Todo++;
+ counters.TodoTotal++;
+ counters.ErrorTotal++;
+ AddAttribute (parent, "error", "todo");
+ if (oparm.attributes.Comment != null)
+ AddAttribute (parent,
"comment", oparm.attributes.Comment);
+ }
+ }
}
public string Name {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches