View | Details | Raw Unified | Return to bug 18171
Collapse All | Expand All

(-)a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs (-3 / +1 lines)
Lines 688-696 namespace System.Runtime.Serialization Link Here
688
		{
688
		{
689
			// First, check XmlSchemaProviderAttribute and try GetSchema() to see if it returns a schema in the expected format.
689
			// First, check XmlSchemaProviderAttribute and try GetSchema() to see if it returns a schema in the expected format.
690
			var xpa = type.GetCustomAttribute<XmlSchemaProviderAttribute> (true);
690
			var xpa = type.GetCustomAttribute<XmlSchemaProviderAttribute> (true);
691
			if (xpa != null) {
691
			if (xpa != null && !xpa.IsAny) {
692
				if (xpa.IsAny)
693
					return XmlQualifiedName.Empty;
694
				var mi = type.GetMethod (xpa.MethodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
692
				var mi = type.GetMethod (xpa.MethodName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
695
				if (mi != null) {
693
				if (mi != null) {
696
					try {
694
					try {
(-)a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs (-1 / +13 lines)
Lines 50-55 namespace System.Xml.Linq Link Here
50
		XName name;
50
		XName name;
51
		XAttribute attr_first, attr_last;
51
		XAttribute attr_first, attr_last;
52
		bool explicit_is_empty = true;
52
		bool explicit_is_empty = true;
53
		bool used_parameterless_construtor = false;
54
55
56
		XElement ()
57
		{
58
			used_parameterless_construtor = true;
59
		}
53
60
54
		public XElement (XName name, object content)
61
		public XElement (XName name, object content)
55
		{
62
		{
Lines 847-853 namespace System.Xml.Linq Link Here
847
854
848
		void IXmlSerializable.ReadXml (XmlReader reader)
855
		void IXmlSerializable.ReadXml (XmlReader reader)
849
		{
856
		{
850
			ReadContentFrom (reader, LoadOptions.None);
857
			if (used_parameterless_construtor)
858
				reader.Read();
859
			var loaded = LoadCore (reader, LoadOptions.None);
860
			this.ReplaceAttributes (loaded.Attributes ());
861
			this.Name = loaded.Name;
862
			this.ReplaceNodes (loaded.Nodes ());
851
		}
863
		}
852
864
853
		XmlSchema IXmlSerializable.GetSchema ()
865
		XmlSchema IXmlSerializable.GetSchema ()

Return to bug 18171