Hi,

The attached patch fixes some API signature fixes for System.Data:

* SqlConnection.cs: Removed extra destructor, as destructor on
System.ComponentModel.Component already calls Dispose.
* SqlParameter.cs: Removed explicit interface implementation of
IDataParameter.ParameterName.
* OdbcErrorCollection.cs: Removed explicit interface implementation
of IEnumerable.GetEnumerator ().
* OdbcCommand.cs: Removed destructor as the destructor in
System.ComponentModel.Component already calls the Dispose method.
Removed explicit interface implemenation of members that are
implement by public members.
* OdbcDataReader.cs: Removed explicit interface implemenation of
IDataRecord.GetData.
* OleDbErrorCollection.cs: Removed explicit interface implementation
of IEnumerable.GetEnumerator ().
* OleDbParameterCollection.cs: Removed explicit interface
implementation members that are already implementation by public
members.
* DataTable.cs: Renamed initInProgress to fInitInProgress. BeginInit
and EndInit must only be virtual in 2.0 profile. Set eol-style to CRLF.

I noticed that Mono's System.Data also introduces a namespace (namely
System.Data.ProviderBase) that does not exist in .NET (1.x or 2.0).

There are quite some API signature mismatches because Mono classes
derive from base classes in that namespace. Do you want me to post a
patch for this too ?

Is it ok to commit the attached patch as is ?

Gert
Index: System.Data.SqlClient/SqlConnection.cs
===================================================================
--- System.Data.SqlClient/SqlConnection.cs	(revision 61261)
+++ System.Data.SqlClient/SqlConnection.cs	(working copy)
@@ -488,11 +488,6 @@
 			GC.SuppressFinalize (this);
 		}
 
-		~SqlConnection ()
-		{
-			Dispose (false);
-		}
-
 		public 
 #if NET_2_0
 		override
Index: System.Data.SqlClient/ChangeLog
===================================================================
--- System.Data.SqlClient/ChangeLog	(revision 61261)
+++ System.Data.SqlClient/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2006-05-31  Gert Driesen  <[EMAIL PROTECTED]>
+
+	* SqlConnection.cs: Removed extra destructor, as destructor on 
+	System.ComponentModel.Component already calls Dispose.
+	* SqlParameter.cs: Removed explicit interface implementation of
+	IDataParameter.ParameterName.
+
 2006-05-26  Senganal T  <[EMAIL PROTECTED]>
 
 	* SqlParameter.cs :
Index: System.Data.SqlClient/SqlParameter.cs
===================================================================
--- System.Data.SqlClient/SqlParameter.cs	(revision 61261)
+++ System.Data.SqlClient/SqlParameter.cs	(working copy)
@@ -234,11 +234,6 @@
 			get { return metaParameter; }
 		}
 
-		string IDataParameter.ParameterName {
-			get { return metaParameter.ParameterName; }
-			set { metaParameter.ParameterName = value; }
-		}
-
 #if ONLY_1_0 || ONLY_1_1
 		[Browsable (false)]
 		[DataSysDescription ("a design-time property used for strongly typed code-generation.")]
Index: System.Data.Odbc/OdbcErrorCollection.cs
===================================================================
--- System.Data.Odbc/OdbcErrorCollection.cs	(revision 61261)
+++ System.Data.Odbc/OdbcErrorCollection.cs	(working copy)
@@ -117,11 +117,6 @@
 			return _items.GetEnumerator ();
 		}
 
-		IEnumerator IEnumerable.GetEnumerator ()
-		{
-			return GetEnumerator ();
-		}
-
 		#endregion // Methods
 	}
 }
Index: System.Data.Odbc/OdbcCommand.cs
===================================================================
--- System.Data.Odbc/OdbcCommand.cs	(revision 61261)
+++ System.Data.Odbc/OdbcCommand.cs	(working copy)
@@ -378,11 +378,6 @@
 			disposed = true;
 		}
 
-		~OdbcCommand ()
-		{
-			Dispose (false);
-		}
-
 		private IntPtr ReAllocStatment ()
 		{
 			OdbcReturn ret;
@@ -574,7 +569,7 @@
 
 		public 
 #if NET_2_0
-                override
+                virtual override
 #endif // NET_2_0
                 void ResetCommandTimeout ()
 		{
Index: System.Data.Odbc/ChangeLog
===================================================================
--- System.Data.Odbc/ChangeLog	(revision 61261)
+++ System.Data.Odbc/ChangeLog	(working copy)
@@ -1,3 +1,14 @@
+2006-05-31  Gert Driesen  <[EMAIL PROTECTED]>
+
+	* OdbcErrorCollection.cs: Removed explicit interface implementation 
+	of IEnumerable.GetEnumerator ().
+	* OdbcCommand.cs: Removed destructor as the destructor in
+	System.ComponentModel.Component already calls the Dispose method.
+	Removed explicit interface implemenation of members that are 
+	implement by public members.
+	* OdbcDataReader.cs: Removed explicit interface implemenation of
+	IDataRecord.GetData.
+
 2006-05-24  Senganal T <[EMAIL PROTECTED]>
        
 	* OdbcColumn.cs :
Index: System.Data.Odbc/OdbcParameterCollection.cs
===================================================================
--- System.Data.Odbc/OdbcParameterCollection.cs	(revision 61261)
+++ System.Data.Odbc/OdbcParameterCollection.cs	(working copy)
@@ -127,10 +127,6 @@
 
 
 #if ONLY_1_1
-		int ICollection.Count {
-			get { return list.Count; }
-		}
-
 		bool IList.IsFixedSize {
 			get { return false; }
 		}
@@ -226,81 +222,7 @@
 				
 			}
 		}
-#if ONLY_1_1
-		int IList.Add (object value)
-		{
-			if (!(value is IDataParameter))
-				throw new InvalidCastException ();
 
-
-			list.Add (value);
-			return list.IndexOf (value);
-		}
-
-		void IList.Clear ()
-		{
-			list.Clear ();
-		}
-
-		bool IList.Contains (object value)
-		{
-			return list.Contains (value);
-		}
-
-		bool IDataParameterCollection.Contains (string value)
-		{
-			for (int i = 0; i < list.Count; i++) {
-				IDataParameter parameter;
-
-				parameter = (IDataParameter) list[i];
-				if (parameter.ParameterName == value)
-					return true;
-			}
-
-			return false;
-		}
-
-		void ICollection.CopyTo (Array array, int index)
-		{
-			((OdbcParameter[])(list.ToArray ())).CopyTo (array, index);
-		}
-
-		IEnumerator IEnumerable.GetEnumerator ()
-		{
-			return list.GetEnumerator ();
-		}
-		
-		int IList.IndexOf (object value)
-		{
-			return list.IndexOf (value);
-		}
-
-		int IDataParameterCollection.IndexOf (string name)
-		{
-			return list.IndexOf (((IDataParameterCollection) this)[name]);
-		}
-
-		void IList.Insert (int index, object value)
-	        {
-			list.Insert (index, value);
-		}
-
-		void IList.Remove (object value)
-		{
-			list.Remove (value);
-		}
-
-		void IList.RemoveAt (int index)
-		{
-			list.Remove ((object) list[index]);
-		}
-
-		void IDataParameterCollection.RemoveAt (string name)
-		{
-			list.Remove (((IDataParameterCollection) this)[name]);
-		}
-#endif // ONLY_1_1
-		
 #if ONLY_1_1
 		public void Clear()
                 {
Index: System.Data.Odbc/OdbcDataReader.cs
===================================================================
--- System.Data.Odbc/OdbcDataReader.cs	(revision 61261)
+++ System.Data.Odbc/OdbcDataReader.cs	(working copy)
@@ -833,12 +833,6 @@
 
 #if ONLY_1_1
 
-                [MonoTODO]
-		IDataReader IDataRecord.GetData (int ordinal)
-		{
-			throw new NotImplementedException ();
-		}
-
 		void IDisposable.Dispose ()
 		{
 			Dispose (true);
Index: System.Data.OleDb/OleDbErrorCollection.cs
===================================================================
--- System.Data.OleDb/OleDbErrorCollection.cs	(revision 61261)
+++ System.Data.OleDb/OleDbErrorCollection.cs	(working copy)
@@ -113,11 +113,6 @@
 			return items.GetEnumerator ();
 		}
 
-		IEnumerator IEnumerable.GetEnumerator ()
-		{
-			return GetEnumerator ();
-		}
-
 		#endregion // Methods
 	}
 }
Index: System.Data.OleDb/ChangeLog
===================================================================
--- System.Data.OleDb/ChangeLog	(revision 61261)
+++ System.Data.OleDb/ChangeLog	(working copy)
@@ -1,3 +1,11 @@
+2006-05-31  Gert Driesen  <[EMAIL PROTECTED]>
+
+	* OleDbErrorCollection.cs: Removed explicit interface implementation
+	of IEnumerable.GetEnumerator ().
+	* OleDbParameterCollection.cs: Removed explicit interface 
+	implementation members that are already implementation by public
+	members.
+
 2006-02-17  Chris Toshok  <[EMAIL PROTECTED]>
 
 	* OleDbDataAdapter.cs, OleDbCommand.cs, OleDbParameter.cs,
Index: System.Data.OleDb/OleDbParameterCollection.cs
===================================================================
--- System.Data.OleDb/OleDbParameterCollection.cs	(revision 61261)
+++ System.Data.OleDb/OleDbParameterCollection.cs	(working copy)
@@ -89,10 +89,6 @@
                         }                                                                                           
 		}
 
-		int ICollection.Count {
-			get { return list.Count; }
-		}
-
 		bool IList.IsFixedSize {
 			get { return false; }
 		}
@@ -180,78 +176,6 @@
 			return Add (new OleDbParameter (name, type, width, src_col));
 		}
 
-		int IList.Add (object value)
-		{
-			if (!(value is IDataParameter))
-				throw new InvalidCastException ();
-
-			list.Add (value);
-			return list.IndexOf (value);
-		}
-
-		void IList.Clear ()
-		{
-			list.Clear ();
-		}
-
-		bool IList.Contains (object value)
-		{
-			return list.Contains (value);
-		}
-
-		bool IDataParameterCollection.Contains (string value)
-		{
-			for (int i = 0; i < list.Count; i++) {
-				IDataParameter parameter;
-
-				parameter = (IDataParameter) list[i];
-				if (parameter.ParameterName == value)
-					return true;
-			}
-
-			return false;
-		}
-
-		void ICollection.CopyTo (Array array, int index)
-		{
-			((OleDbParameter[])(list.ToArray ())).CopyTo (array, index);
-		}
-
-		IEnumerator IEnumerable.GetEnumerator ()
-		{
-			return list.GetEnumerator ();
-		}
-		
-		int IList.IndexOf (object value)
-		{
-			return list.IndexOf (value);
-		}
-
-		int IDataParameterCollection.IndexOf (string name)
-		{
-			return list.IndexOf (((IDataParameterCollection) this)[name]);
-		}
-
-		void IList.Insert (int index, object value)
-	        {
-			list.Insert (index, value);
-		}
-
-		void IList.Remove (object value)
-		{
-			list.Remove (value);
-		}
-
-		void IList.RemoveAt (int index)
-		{
-			list.Remove ((object) list[index]);
-		}
-
-		void IDataParameterCollection.RemoveAt (string name)
-		{
-			list.Remove (((IDataParameterCollection) this)[name]);
-		}
-	
 		public void Clear() {
                        
 			foreach (OleDbParameter p in list)
Index: System.Data/ChangeLog
===================================================================
--- System.Data/ChangeLog	(revision 61261)
+++ System.Data/ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2006-05-31  Gert Driesen  <[EMAIL PROTECTED]>
+
+	* DataTable.cs: Renamed initInProgress to fInitInProgress. BeginInit
+	and EndInit must only be virtual in 2.0 profile. Set eol-style to CRLF.
+
 2006-04-21  Senganal T  <[EMAIL PROTECTED]>
 
 	* DataRowCollection.cs :
Index: System.Data/DataTable.cs
===================================================================
--- System.Data/DataTable.cs	(revision 61261)
+++ System.Data/DataTable.cs	(working copy)
@@ -96,7 +96,7 @@
 		private ArrayList _indexes;
 		private RecordCache _recordCache;
 		private int _defaultValuesRowIndex = -1;
-		protected internal bool initInProgress;
+		protected internal bool fInitInProgress;
 
 		// If CaseSensitive property is changed once it does not anymore follow owner DataSet's 
 		// CaseSensitive property. So when you lost you virginity it's gone for ever
@@ -728,7 +728,11 @@
 		/// on a form or used by another component. The initialization
 		/// occurs at runtime.
 		/// </summary>
-		public virtual void BeginInit () 
+		public 
+#if NET_2_0
+		virtual
+#endif
+		void BeginInit () 
 		{
 			InitInProgress = true;
 		}
@@ -925,15 +929,19 @@
 		/// initialization occurs at runtime.
 		/// </summary>
 		[MonoTODO]
-		public virtual void EndInit () 
+		public
+#if NET_2_0
+		virtual
+#endif
+		void EndInit () 
 		{
 			InitInProgress = false;
 			FinishInit ();
 		}
 
 		internal bool InitInProgress {
-			get { return initInProgress; }
-			set { initInProgress = value; }
+			get { return fInitInProgress; }
+			set { fInitInProgress = value; }
 		}
 
 		internal void FinishInit ()

Property changes on: System.Data/DataTable.cs
___________________________________________________________________
Name: svn:eol-style
   + CRLF

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to