2002-03-13 Duncan Mak <duncan@ximian.com>
authorDuncan Mak <duncan@mono-cvs.ximian.com>
Thu, 14 Mar 2002 00:40:00 +0000 (00:40 -0000)
committerDuncan Mak <duncan@mono-cvs.ximian.com>
Thu, 14 Mar 2002 00:40:00 +0000 (00:40 -0000)
* XmlException.cs: Made it [Serializable], implemented good ol'
GetObjectData, and the serialization constructor.

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

mcs/class/System.XML/System.Xml/ChangeLog
mcs/class/System.XML/System.Xml/XmlException.cs

index a8c7a2f8596f989c6fa454ebf589ffdaeb1e2564..b9aacea21f2b7e4916c35b532c8962cdab0bd6ab 100644 (file)
@@ -1,5 +1,8 @@
 2002-03-13  Duncan Mak  <duncan@ximian.com>
 
+       * XmlException.cs: Made it [Serializable], implemented good ol'
+       GetObjectData, and the serialization constructor.
+
        * XmlNamedNodeMap.cs (SetNamedItem): Check for the Name property.
        (SetNamedItem): Reverted (added back in) the patch with the
        ReadOnly checks. "Don't doubt yourself, my son... you were right!"
index b70da48ecfb76357bc5a71511655b22b7617690d..4bb99d1860763e86d72d5f49c0a702237311205e 100755 (executable)
@@ -12,6 +12,7 @@ using System.Runtime.Serialization;
 
 namespace System.Xml
 {
+       [Serializable]
        public class XmlException : SystemException
        {
                #region Fields
@@ -28,13 +29,14 @@ namespace System.Xml
                {
                }
 
-               [MonoTODO]
                protected XmlException (SerializationInfo info, StreamingContext context)
                {
-                       throw new NotImplementedException ();
+                       this.lineNumber = info.GetInt32 ("lineNumber");
+                       this.linePosition = info.GetInt32 ("linePosition");
                }
 
-               internal XmlException (string message) : base (message)
+               internal XmlException (string message)
+                       : base (message)
                {
                }
 
@@ -59,5 +61,16 @@ namespace System.Xml
                }
 
                #endregion
+
+               #region Methods
+
+               public override void GetObjectData (SerializationInfo info, StreamingContext context)
+               {
+                       base.GetObjectData (info, context);
+                       info.AddValue ("lineNumber", lineNumber);
+                       info.AddValue ("linePosition", linePosition);
+               }
+
+               #endregion
        }
 }