//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-// Marek Safar (marek.safar@gmail.com)
+// Marek Safar (marek.safar@gmail.com)
//
-// (C) 2003 Novell, Inc (http://www.novell.com)
+// Maintainer:
+// C.J. Adams-Collier (cjac@colliertech.org)
//
+// (C) 2003 Novell, Inc (http://www.novell.com)
+// (C) 2009,2010 Collier Technologies (http://www.colliertech.org)
using System;
using System.Collections;
public bool HaveWarnings {
get { return haveWarnings; }
}
-
+
public Counters Counters {
get { return counters; }
}
-
+
public abstract void CompareTo (XmlDocument doc, XmlNode parent, object other);
}
-
+
abstract class XMLNameGroup : XMLData
{
protected XmlNode group;
this.document = doc;
XmlNode parent = doc.CreateElement ("assemblies", null);
doc.AppendChild (parent);
-
+
CompareTo (doc, parent, other);
XmlNode decl = doc.CreateXmlDeclaration ("1.0", null, null);
XMLEvents events;
XMLMethods methods;
XMLClass [] nested;
-
+
public override void LoadData (XmlNode node)
{
if (node == null)
// Console.Error.WriteLine ("Empty class {0} {1}", name, type);
return;
}
-
+
if (child.Name == "attributes") {
attributes = new XMLAttributes ();
attributes.LoadData (child);
child = child.NextSibling;
}
+ if (child != null && child.Name == "generic-parameters") {
+ // HACK: ignore this tag as it doesn't seem to
+ // add any value when checking for differences
+ return;
+ }
+
if (child == null)
return;
if (type != oparm.type)
AddWarning (parent, "Parameter type is wrong: {0} != {1}", type, oparm.type);
-
+
if (attrib != oparm.attrib)
AddWarning (parent, "Parameter attributes wrong: {0} != {1}", attrib, oparm.attrib);
if (de.Value.Equals (other_value))
continue;
- AddWarning (parent, "Property '{0}' is '{1}' and should be '{2}'",
+ AddWarning (parent, "Property '{0}' is '{1}' and should be '{2}'",
de.Key, de.Value, other_value == null ? "null" : other_value);
}
}
{
string key = null;
- // if multiple attributes with the same name (type) exist, then we
+ // if multiple attributes with the same name (type) exist, then we
// cannot be sure which attributes correspond, so we must use the
// name of the attribute (type) and the name/value of its properties
// as key
}
}
- // sort properties by name, as order of properties in XML is
+ // sort properties by name, as order of properties in XML is
// undefined
keyParts.Sort ();
XmlAttribute xatt = node.Attributes ["attrib"];
if (xatt != null)
access [name] = xatt.Value;
-
+
XmlNode orig = node;
node = node.FirstChild;
return null;
}
}
-
+
class XMLFields : XMLMember
{
Hashtable fieldTypes;
public override string GetNodeKey (string name, XmlNode node)
{
XmlAttributeCollection atts = node.Attributes;
- return String.Format ("{0}:{1}:{2}", atts ["name"].Value,
- atts ["ptype"].Value,
- atts ["params"].Value);
+ return String.Format ("{0}:{1}:{2}",
+ (atts["name"] != null ? atts["name"].Value : ""),
+ (atts["ptype"] != null ? atts["ptype"].Value : ""),
+ (atts["params"] != null ? atts["params"].Value : "")
+ );
}
public override string GroupName {
if ((ma & MethodAttributes.RequireSecObject) != 0)
ma = (MethodAttributes) (att - (int) MethodAttributes.RequireSecObject);
- // we don't care if the implementation is forwarded through PInvoke
+ // we don't care if the implementation is forwarded through PInvoke
if ((ma & MethodAttributes.PinvokeImpl) != 0)
ma = (MethodAttributes) (att - (int) MethodAttributes.PinvokeImpl);