merge -r 52249:58569
authorBoris Kirzner <borisk@mono-cvs.ximian.com>
Mon, 27 Mar 2006 12:34:13 +0000 (12:34 -0000)
committerBoris Kirzner <borisk@mono-cvs.ximian.com>
Mon, 27 Mar 2006 12:34:13 +0000 (12:34 -0000)
svn path=/branches/mainsoft/gh1.7/mcs/; revision=58575

mcs/class/System.Data/System.Data.SqlTypes.jvm/ChangeLog
mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlNullValueException.cs
mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlTypeException.cs

index ece74860d340e64274427b90f2ff67a474f6ea78..8f199c5b112622389db6fb2e4e7b80d843020a15 100644 (file)
@@ -1,3 +1,7 @@
+2006-03-27     Boris Kirzner <borisk@mainsoft.com>
+       * SqlNullValueException.cs, SqlTypeException.cs: 
+       fix Soap Serialization .NET compatibility
+
 2005-10-26  Boris Kirzner  <borisk@mainsoft.com>
 
        * SqlBinary.cs : Avoid ArrayTypeMismatch exception by 
index b52e50674337f83e9e5cee511507c169f8e9a7f6..760349f7f946ee94a2efa1f9a07cdd6eeebeff37 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+using System.Runtime.Serialization;
 
 namespace System.Data.SqlTypes
 {
-
-    /**
-     * The exception that is thrown for errors in an arithmetic, casting, or conversion operation
-     *
-     * @author  Pavel Sandler
-     * @version 1.0, 01/01/03
-     */
-
-    /*
-    * CURRENT LIMITATIONS
-    * 1. Constructor(SerializationInfo info, StreamingContext context) is not supported
-    * 2. Method "void GetObjectData(...,...)" is not supported from ISerializable
-    */
-
        [Serializable]
     public class SqlNullValueException : System.Data.SqlTypes.SqlTypeException
     {
-        /**
-                                            * Initializes a new instance of the <code>SqlNullValueException</code> class.
-                                            */
         public SqlNullValueException() : base("Data is Null. This method or property cannot be called on Null values.")
         {
         }
 
-        /**
-         * Initializes a new instance of the <code>SqlNullValueException</code> class
-         * with a specified error message.
-         *
-         * @param message The message that describes the error.
-         */
         public SqlNullValueException(String message): base(message)
         {
+                       _message = message;
+        }
+
+               public SqlNullValueException (SerializationInfo info, StreamingContext context) 
+                       : this () {
+                       _message = (string) info.GetString ("SqlNullValueExceptionMessage");
+               }
+
+               public SqlNullValueException(String message, Exception innerException): base(message, innerException)
+        {
+                       _message = message;
+        }
+
+               public override void GetObjectData (SerializationInfo si, StreamingContext context)
+        {                                             
+            si.AddValue ("SqlNullValueExceptionMessage", Message);                
         }
     }
 }
\ No newline at end of file
index ce40b50f9964dd2c6ac4db4cb9bb404e954ecdb4..a4f859c446d4fba6ad5afa8f7182094a187529fb 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System;
+using System.Runtime.Serialization;
+
 namespace System.Data.SqlTypes
 {
-
-
-    /**
-     * The base exception class for the System.Data.SqlTypes .
-     */
-
-    /*
-    * CURRENT LIMITATIONS
-    * 1. Constructor(SerializationInfo info, StreamingContext context) is not supported
-    * 2. Method "void GetObjectData(...,...)" is not supported from ISerializable
-    */
-
-    using System;
-
        [Serializable]
     public class SqlTypeException : SystemException
     {
-        /**
-         * Initializes a new instance of the <code>SqlTypeException</code> class
-         * with a specified error message.
-         *
-         * @param message The message that describes the error.
-         */
+               protected string _message;
+
+               public SqlTypeException() : this("System error.")
+        {
+        }
+
         public SqlTypeException(String message) : base(message)
         {
+                       _message = message;
+        }
+
+               public SqlTypeException (SerializationInfo info, StreamingContext context) {
+                       _message = (string) info.GetString ("SqlTypeExceptionMessage");
+               }
+
+               public SqlTypeException(String message, Exception innerException) : base(message, innerException)
+        {
+                       _message = message;
+        }
+
+               public override string Message {
+                       get { return _message; }
+               }
+
+               public override void GetObjectData (SerializationInfo si, StreamingContext context)
+        {                                             
+            si.AddValue ("SqlTypeExceptionMessage", Message);                
         }
     }
 }
\ No newline at end of file