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:38:10 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2004-06-18 19:38:10 +0400
commitf776ed3720477cec2db8c3cca2bbb5f8dbfd7e91 (patch)
tree5880cc93b26e2e8eec45a5ef3df79ec5235380e4 /mcs/class/System.Data/System.Data.OleDb
parent8c65905adbbdbfa21790cdecdee940bcbd3c78a6 (diff)
* OleDbError.cs: fixed serialization compatibility with MS.NET
* OleDbErrorCollection.cs: fixed serialization compatibility with MS.NET svn path=/trunk/mcs/; revision=29886
Diffstat (limited to 'mcs/class/System.Data/System.Data.OleDb')
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/ChangeLog6
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbError.cs17
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbErrorCollection.cs38
3 files changed, 34 insertions, 27 deletions
diff --git a/mcs/class/System.Data/System.Data.OleDb/ChangeLog b/mcs/class/System.Data/System.Data.OleDb/ChangeLog
index c2f842076df..763694a6941 100644
--- a/mcs/class/System.Data/System.Data.OleDb/ChangeLog
+++ b/mcs/class/System.Data/System.Data.OleDb/ChangeLog
@@ -1,3 +1,9 @@
+2004-06-16 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * OleDbError.cs: fixed serialization compatibility with MS.NET
+ * OleDbErrorCollection.cs: fixed serialization compatibility with
+ MS.NET
+
2004-06-13 Gert Driesen <drieseng@users.sourceforge.net>
* OleDbLiteral.cs: changed enum field values to match MS.NET
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbError.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbError.cs
index 2242550cabb..2497c3d8c75 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbError.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbError.cs
@@ -37,20 +37,21 @@ using System.Data.Common;
namespace System.Data.OleDb
{
+ [Serializable]
public sealed class OleDbError
{
- private string errorMessage;
+ private string message;
private int nativeError;
- private string errorSource;
+ private string source;
private string sqlState;
#region Constructors
internal OleDbError (string msg, int code, string source, string sql)
{
- errorMessage = msg;
+ message = msg;
nativeError = code;
- errorSource = source;
+ this.source = source;
sqlState = sql;
}
@@ -60,7 +61,7 @@ namespace System.Data.OleDb
public string Message {
get {
- return errorMessage;
+ return message;
}
}
@@ -72,7 +73,7 @@ namespace System.Data.OleDb
public string Source {
get {
- return errorSource;
+ return source;
}
}
@@ -93,8 +94,8 @@ namespace System.Data.OleDb
String stackTrace;
stackTrace = " <Stack Trace>";
// FIXME: generate the correct SQL error string
- toStr = "OleDbError:" + errorMessage + stackTrace;
- return toStr;
+ toStr = "OleDbError:" + message + stackTrace;
+ return toStr;
}
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbErrorCollection.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbErrorCollection.cs
index 08362b77cb4..af50d07f4ca 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbErrorCollection.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbErrorCollection.cs
@@ -39,46 +39,46 @@ using System.Data.Common;
namespace System.Data.OleDb
{
- [ListBindableAttribute ( false)]
-
+ [ListBindableAttribute ( false)]
+ [Serializable]
public sealed class OleDbErrorCollection : ICollection, IEnumerable
{
#region Fields
- ArrayList list;
+ ArrayList items;
- #endregion // Fields
-
- #region Constructors
-
- internal OleDbErrorCollection() {
- }
-
+ #endregion // Fields
+
+ #region Constructors
+
+ internal OleDbErrorCollection() {
+ }
+
#endregion Constructors
#region Properties
public int Count {
get {
- return list.Count;
+ return items.Count;
}
}
public OleDbError this[int index] {
get {
- return (OleDbError) list[index];
+ return (OleDbError) items[index];
}
}
object ICollection.SyncRoot {
get {
- return list.SyncRoot;
+ return items.SyncRoot;
}
}
bool ICollection.IsSynchronized {
get {
- return list.IsSynchronized;
+ return items.IsSynchronized;
}
}
@@ -88,7 +88,7 @@ namespace System.Data.OleDb
internal void Add (OleDbError error)
{
- list.Add ((object) error);
+ items.Add ((object) error);
}
public void CopyTo (Array array, int index)
@@ -102,15 +102,15 @@ namespace System.Data.OleDb
// is the check for IsFixedSize required?
if ((array.IsFixedSize) || (index + this.Count > array.GetUpperBound (0)))
throw new ArgumentException("array");
-
- ((OleDbError[])(list.ToArray ())).CopyTo (array, index);
-
+
+ ((OleDbError[]) (items.ToArray ())).CopyTo (array, index);
+
}
public IEnumerator GetEnumerator ()
{
- return list.GetEnumerator ();
+ return items.GetEnumerator ();
}
IEnumerator IEnumerable.GetEnumerator ()