+2008-01-24 Atsushi Enomoto <atsushi@ximian.com>
+
+ * TypeData.cs : fixed setter which did not actually see the argument.
+ * XmlTypeMapElementInfo.cs : some cosmetic fixes for gendarme-
+ reported issues.
+
2007-11-09 Atsushi Enomoto <atsushi@ximian.com>
* XmlTypeMapping.cs : to get schema provider method, check base
public bool IsTextElement
{
get { return ElementName == "<text>"; }
- set { ElementName = "<text>"; Namespace = string.Empty; }
+ set {
+ if (!value)
+ throw new Exception ("INTERNAL ERROR; someone wrote unexpected code in sys.xml");
+ ElementName = "<text>"; Namespace = string.Empty;
+ }
}
public bool IsUnnamedAnyElement
{
get { return ElementName == string.Empty; }
- set { ElementName = string.Empty; Namespace = string.Empty; }
+ set {
+ if (!value)
+ throw new Exception ("INTERNAL ERROR; someone wrote unexpected code in sys.xml");
+ ElementName = string.Empty; Namespace = string.Empty;
+ }
}
public override bool Equals (object other)
{
+ if (other == null)
+ return false;
XmlTypeMapElementInfo oinfo = (XmlTypeMapElementInfo)other;
if (_elementName != oinfo._elementName) return false;
if (_type.XmlType != oinfo._type.XmlType) return false;