Przeglądaj źródła

2005-12-08 Atsushi Enomoto <[email protected]>

	* XmlSchemaValidationException.cs : added SetSourceObject() which
	  is just for API compat (it does nothing on MS.NET).
	  Removed #if NET_2_0 inside #if NET_2_0.

	* XsdParticleValidationTests.cs : ValidateRootElementOnlyInvalid()
	  does not throw validation exception under MS 2.0, this NotDotNet.


svn path=/trunk/mcs/; revision=54092
Atsushi Eno 20 lat temu
rodzic
commit
e87e54f481

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

@@ -1,3 +1,9 @@
+2005-12-08  Atsushi Enomoto <[email protected]>
+
+	* XmlSchemaValidationException.cs : added SetSourceObject() which
+	  is just for API compat (it does nothing on MS.NET).
+	  Removed #if NET_2_0 inside #if NET_2_0.
+
 2005-12-01  Atsushi Enomoto <[email protected]>
 
 	* XmlSchemaSequence.cs : when a subcomponent is not optional

+ 5 - 2
mcs/class/System.XML/System.Xml.Schema/XmlSchemaValidationException.cs

@@ -83,15 +83,18 @@ namespace System.Xml.Schema
 		{
 		}
 
-#if NET_2_0
 		[SecurityPermission (SecurityAction.LinkDemand,
 			Flags=SecurityPermissionFlag.SerializationFormatter)]
-#endif
 		public override void GetObjectData (
 			SerializationInfo info, StreamingContext context)
 		{
 			base.GetObjectData (info, context);
 		}
+
+		// Never use it. It actually does nothing even on MS.NET 2.0.
+		protected internal void SetSourceObject (object o)
+		{
+		}
 	}
 }
 

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

@@ -1,3 +1,8 @@
+2005-12-08  Atsushi Enomoto <[email protected]>
+
+	* XsdParticleValidationTests.cs : ValidateRootElementOnlyInvalid()
+	  does not throw validation exception under MS 2.0, this NotDotNet.
+
 2005-12-08  Atsushi Enomoto <[email protected]>
 
 	* XmlReaderCommonTests.cs : use ProhibitDtd=false in CreateSimple()

+ 4 - 0
mcs/class/System.XML/Test/System.Xml/XsdParticleValidationTests.cs

@@ -48,6 +48,10 @@ namespace MonoTests.System.Xml
 		}
 
 		[Test]
+#if NET_2_0
+		[Category ("NotDotNet")]
+		// MS.NET throws XmlSchemaException, not -ValidationException.
+#endif
 		[ExpectedException (typeof (ValidationException))]
 		public void ValidateRootElementOnlyInvalid ()
 		{