Jelajahi Sumber

* XmlTypeMapElementInfo.cs: no need to compare nesting level in Equals.
* XmlReflectionImporter.cs: Changed nullable default. Assign member's namespace to an
array if the namespace is not specified in XmlArrayItemAttribute.

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

Lluis Sanchez 22 tahun lalu
induk
melakukan
282c082c7d

+ 6 - 0
mcs/class/System.XML/System.Xml.Serialization/ChangeLog

@@ -1,3 +1,9 @@
+2003-06-24  Lluis Sanchez Gual <[email protected]>
+
+	* XmlTypeMapElementInfo.cs: no need to compare nesting level in Equals.
+	* XmlReflectionImporter.cs: Changed nullable default. Assign member's namespace to an
+	  array if the namespace is not specified in XmlArrayItemAttribute.
+
 2003-06-17  Lluis Sanchez Gual <[email protected]>
 
 	* XmlReflectionImporter.cs: Reset internal tables for each ImportMembersMapping call.

+ 3 - 2
mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs

@@ -241,7 +241,8 @@ namespace System.Xml.Serialization {
 				Type elemType = (att.Type != null) ? att.Type : itemType;
 				XmlTypeMapElementInfo elem = new XmlTypeMapElementInfo (null, TypeTranslator.GetTypeData(elemType));
 				elem.DataType = att.DataType;
-				elem.Namespace = att.Namespace != null ? att.Namespace : "";
+				elem.Namespace = att.Namespace != null ? att.Namespace : defaultNamespace;
+				if (elem.Namespace == null) elem.Namespace = "";
 				elem.Form = att.Form;
 				elem.IsNullable = att.IsNullable;
 				elem.NestingLevel = att.NestingLevel;
@@ -270,7 +271,7 @@ namespace System.Xml.Serialization {
 				else elem.ElementName = TypeTranslator.GetTypeData(itemType).XmlType ;
 
 				elem.Namespace = (defaultNamespace != null) ? defaultNamespace : "";
-				elem.IsNullable = true;	// By default, items are nullable
+				elem.IsNullable = false;
 				list.Add (elem);
 			}
 

+ 0 - 1
mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapElementInfo.cs

@@ -135,7 +135,6 @@ namespace System.Xml.Serialization
 			if (_choiceValue != oinfo._choiceValue) return false;
 			if (_type.Type != oinfo._type.Type) return false;
 			if (_isNullable != oinfo._isNullable) return false;
-			if (_nestingLevel != oinfo._nestingLevel) return false;
 			return true;
 		}