Explorar el Código

2010-01-22 Atsushi Enomoto <[email protected]>

	* XmlDocument.cs : fix type check for optimal node creation.
	  Fixed bug #571336, #571226 and #572738.


svn path=/trunk/mcs/; revision=150041
Atsushi Eno hace 16 años
padre
commit
eb13491be6

+ 5 - 0
mcs/class/System.XML/System.Xml/ChangeLog

@@ -1,3 +1,8 @@
+2010-01-22  Atsushi Enomoto  <[email protected]>
+
+	* XmlDocument.cs : fix type check for optimal node creation.
+	  Fixed bug #571336, #571226 and #572738.
+
 2010-01-15  Atsushi Enomoto  <[email protected]>
 
 	* XmlConvert.cs : Do not ignore ticks which are less than a

+ 2 - 2
mcs/class/System.XML/System.Xml/XmlDocument.cs

@@ -104,8 +104,8 @@ namespace System.Xml
 			resolver = new XmlUrlResolver ();
 			
 			Type type = GetType ();
-			optimal_create_element = type.GetMethod ("CreateElement", optimal_create_types).DeclaringType == type;
-			optimal_create_attribute = type.GetMethod ("CreateAttribute", optimal_create_types).DeclaringType == type;
+			optimal_create_element = type.GetMethod ("CreateElement", optimal_create_types).DeclaringType == typeof (XmlDocument);
+			optimal_create_attribute = type.GetMethod ("CreateAttribute", optimal_create_types).DeclaringType == typeof (XmlDocument);
 		}
 		#endregion