Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Driesen <drieseng@users.sourceforge.net>2004-06-18 19:40:47 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2004-06-18 19:40:47 +0400
commitf9dddf53746104a87e6ee2bd04d4ec1a053cc743 (patch)
treeb07591972eb1b6e291c54d6c206ae7c40f69e545 /mcs/class/System.Data/System.Data.SqlTypes
parentf776ed3720477cec2db8c3cca2bbb5f8dbfd7e91 (diff)
* SqlNullValueException.cs: fixed serialization
* SqlTruncateException.cs: fixed serialization * SqlTypeException.cs: fixed serialization svn path=/trunk/mcs/; revision=29887
Diffstat (limited to 'mcs/class/System.Data/System.Data.SqlTypes')
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/ChangeLog6
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlNullValueException.cs13
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlTruncateException.cs12
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlTypeException.cs21
4 files changed, 40 insertions, 12 deletions
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
index 795093950e9..ea9559e96e5 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
+++ b/mcs/class/System.Data/System.Data.SqlTypes/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-18 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * SqlNullValueException.cs: fixed serialization
+ * SqlTruncateException.cs: fixed serialization
+ * SqlTypeException.cs: fixed serialization
+
2004-06-18 Sebastien Pouliot <sebastien@ximian.com>
* SqlMoney.cs: Removed old "hack" to correct scale after rounding as
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlNullValueException.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlNullValueException.cs
index eedbdd43d7c..0b488d3daf9 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlNullValueException.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlNullValueException.cs
@@ -33,9 +33,8 @@ using System.Globalization;
using System.Runtime.Serialization;
namespace System.Data.SqlTypes {
-
[Serializable]
- public sealed class SqlNullValueException : SqlTypeException
+ public sealed class SqlNullValueException : SqlTypeException, ISerializable
{
public SqlNullValueException ()
: base (Locale.GetText ("Data is Null. This method or property cannot be called on Null values."))
@@ -51,5 +50,15 @@ namespace System.Data.SqlTypes {
: base (message, inner)
{
}
+
+ private SqlNullValueException (SerializationInfo si, StreamingContext sc)
+ : base(si.GetString("SqlNullValueExceptionMessage"))
+ {
+ }
+
+ void ISerializable.GetObjectData (SerializationInfo si, StreamingContext context)
+ {
+ si.AddValue ("SqlNullValueExceptionMessage", Message, typeof(string));
+ }
}
}
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlTruncateException.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlTruncateException.cs
index e40d874e8f8..ec174b120f1 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlTruncateException.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlTruncateException.cs
@@ -35,7 +35,7 @@ using System.Runtime.Serialization;
namespace System.Data.SqlTypes {
[Serializable]
- public sealed class SqlTruncateException : SqlTypeException
+ public sealed class SqlTruncateException : SqlTypeException, ISerializable
{
public SqlTruncateException ()
: base (Locale.GetText ("This value is being truncated"))
@@ -51,5 +51,15 @@ namespace System.Data.SqlTypes {
: base (message, inner)
{
}
+
+ private SqlTruncateException (SerializationInfo si, StreamingContext sc)
+ : base(si.GetString("SqlTruncateExceptionMessage"))
+ {
+ }
+
+ void ISerializable.GetObjectData (SerializationInfo si, StreamingContext context)
+ {
+ si.AddValue ("SqlTruncateExceptionMessage", Message, typeof(string));
+ }
}
}
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlTypeException.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlTypeException.cs
index b20dfaaa817..145de1b1944 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlTypeException.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlTypeException.cs
@@ -34,10 +34,9 @@ using System.Runtime.Serialization;
namespace System.Data.SqlTypes {
- [Serializable]
- public class SqlTypeException : SystemException
+ [Serializable]
+ public class SqlTypeException : SystemException, ISerializable
{
-
public SqlTypeException()
: base (Locale.GetText ("A sql exception has occured."))
{
@@ -48,15 +47,19 @@ namespace System.Data.SqlTypes {
{
}
- protected SqlTypeException (SerializationInfo info, StreamingContext context)
- : base (info, context)
+ public SqlTypeException (string message, Exception inner)
+ : base (message, inner)
{
}
- public SqlTypeException (string message, Exception inner)
- : base (message, inner)
- {
- }
+ protected SqlTypeException (SerializationInfo si, StreamingContext sc)
+ : base(si.GetString("SqlTypeExceptionMessage"))
+ {
+ }
+ void ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
+ {
+ si.AddValue ("SqlTypeExceptionMessage", Message, typeof(string));
+ }
}
}