Переглянути джерело

* OleDbDataAdapter.cs: Changed argument names to match MS. Removed
extra explicit interface implementation.
* OleDbParameter.cs: Changed argument names to match MS.
* OleDbTransaction.cs: Do not include IDbConnection.Connection and
IDisposable.Dispose for 2.0 profile.
* OleDbParameterCollection.cs: Changed argument names to match MS.
Do not include explicit interface implementations on 2.0 profile.
* OleDbConnection.cs: Changed argument names to match MS. Code
formatting.

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

Gert Driesen 18 роки тому
батько
коміт
0785be89cc

+ 12 - 0
mcs/class/System.Data/System.Data.OleDb/ChangeLog

@@ -1,3 +1,15 @@
+2008-04-21  Gert Driesen  <[email protected]>
+
+	* OleDbDataAdapter.cs: Changed argument names to match MS. Removed
+	extra explicit interface implementation.
+	* OleDbParameter.cs: Changed argument names to match MS.
+	* OleDbTransaction.cs: Do not include IDbConnection.Connection and
+	IDisposable.Dispose for 2.0 profile.
+	* OleDbParameterCollection.cs: Changed argument names to match MS.
+	Do not include explicit interface implementations on 2.0 profile.
+	* OleDbConnection.cs: Changed argument names to match MS. Code
+	formatting.
+
 2008-03-03  Ankit Jain  <[email protected]>
 
 	* OleDbMetaDataCollectionNames.cs: New.

+ 7 - 7
mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs

@@ -222,11 +222,11 @@ namespace System.Data.OleDb
 			return new OleDbTransaction (this);
 		}
 
-		public new OleDbTransaction BeginTransaction (IsolationLevel level)
+		public new OleDbTransaction BeginTransaction (IsolationLevel isolationLevel)
 		{
 			if (State == ConnectionState.Closed)
 				throw ExceptionHelper.ConnectionClosed ();
-			return new OleDbTransaction (this, level);
+			return new OleDbTransaction (this, isolationLevel);
 		}
 
 #if NET_2_0
@@ -245,9 +245,9 @@ namespace System.Data.OleDb
 			return BeginTransaction ();
 		}
 
-		IDbTransaction IDbConnection.BeginTransaction (IsolationLevel level)
+		IDbTransaction IDbConnection.BeginTransaction (IsolationLevel isolationLevel)
 		{
-			return BeginTransaction (level);
+			return BeginTransaction (isolationLevel);
 		}
 
 		IDbCommand IDbConnection.CreateCommand ()
@@ -260,12 +260,12 @@ namespace System.Data.OleDb
 #if NET_2_0
 		override
 #endif
-		void ChangeDatabase (string name)
+		void ChangeDatabase (string value)
 		{
 			if (State != ConnectionState.Open)
 				throw new InvalidOperationException ();
 
-			if (!libgda.gda_connection_change_database (gdaConnection, name))
+			if (!libgda.gda_connection_change_database (gdaConnection, value))
 				throw new OleDbException (this);
 		}
 
@@ -409,7 +409,7 @@ namespace System.Data.OleDb
 
 		[MonoTODO]
 		[EditorBrowsable (EditorBrowsableState.Advanced)]
-		public void ResetState()
+		public void ResetState ()
 		{
 			throw new NotImplementedException ();
 		}

+ 2 - 18
mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs

@@ -50,8 +50,6 @@ namespace System.Data.OleDb
 		OleDbCommand insertCommand;
 		OleDbCommand selectCommand;
 		OleDbCommand updateCommand;
-		MissingMappingAction missingMappingAction;
-		MissingSchemaAction missingSchemaAction;
 
 		#endregion
 
@@ -155,25 +153,11 @@ namespace System.Data.OleDb
 			}
 		}
 
-		MissingMappingAction IDataAdapter.MissingMappingAction {
-			get { return missingMappingAction; }
-			set { missingMappingAction = value; }
-		}
-
-		MissingSchemaAction IDataAdapter.MissingSchemaAction {
-			get { return missingSchemaAction; }
-			set { missingSchemaAction = value; }
-		}
-		
 		IDbCommand IDbDataAdapter.UpdateCommand {
 			get { return UpdateCommand; }
 			set { UpdateCommand = (OleDbCommand) value; }
 		}
 
-		ITableMappingCollection IDataAdapter.TableMappings {
-			get { return TableMappings; }
-		}
-
 		#endregion // Properties
 
 		#region Methods
@@ -208,13 +192,13 @@ namespace System.Data.OleDb
 		}
 		
 		[MonoTODO]
-		public int Fill(DataTable datatable, Object adoDBRecordSet)
+		public int Fill (DataTable dataTable, Object ADODBRecordSet)
 		{
 			throw new NotImplementedException ();
 		}
 
 		[MonoTODO]
-		public int Fill(DataSet dataset, Object adoDBRecordSet, String srcTable)
+		public int Fill (DataSet dataSet, Object ADODBRecordSet, String srcTable)
 		{
 			throw new NotImplementedException ();
 		}

+ 7 - 10
mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs

@@ -72,12 +72,9 @@ namespace System.Data.OleDb
 		
 		public OleDbParameter ()
 		{
-			name = String.Empty;
-			size = 0;
+			name = string.Empty;
 			isNullable = true;
-			precision = 0;
-			scale = 0;
-			sourceColumn = String.Empty;
+			sourceColumn = string.Empty;
 			gdaParameter = IntPtr.Zero;
 		}
 
@@ -109,8 +106,8 @@ namespace System.Data.OleDb
 		}
 		
 		[EditorBrowsableAttribute (EditorBrowsableState.Advanced)]
-		public OleDbParameter(string name, OleDbType dataType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, DataRowVersion srcVersion, object value)
-			: this (name, dataType, size, srcColumn)
+		public OleDbParameter (string parameterName, OleDbType dbType, int size, ParameterDirection direction, bool isNullable, byte precision, byte scale, string srcColumn, DataRowVersion srcVersion, object value)
+			: this (parameterName, dbType, size, srcColumn)
 		{
 			this.direction = direction;
 			this.isNullable = isNullable;
@@ -122,13 +119,13 @@ namespace System.Data.OleDb
 
 #if NET_2_0
 		[EditorBrowsable (EditorBrowsableState.Advanced)]
-		public OleDbParameter (string name, OleDbType dataType, int size, ParameterDirection direction, byte precision, byte scale, string srcColumn, DataRowVersion srcVersion, bool sourceColumnNullMapping, object value)
-			: this (name, dataType, size, srcColumn)
+		public OleDbParameter (string parameterName, OleDbType dbType, int size, ParameterDirection direction, byte precision, byte scale, string sourceColumn, DataRowVersion sourceVersion, bool sourceColumnNullMapping, object value)
+			: this (parameterName, dbType, size, sourceColumn)
 		{
 			this.direction = direction;
 			this.precision = precision;
 			this.scale = scale;
-			this.sourceVersion = srcVersion;
+			this.sourceVersion = sourceVersion;
 			this.sourceColumnNullMapping = sourceColumnNullMapping;
 			this.value = value;
 		}

+ 16 - 16
mcs/class/System.Data/System.Data.OleDb/OleDbParameterCollection.cs

@@ -125,8 +125,7 @@ namespace System.Data.OleDb
 				return list.SyncRoot;
 			}
 		}
-#endif
-
+#else
 		bool IList.IsFixedSize {
 			get { return false; }
 		}
@@ -148,7 +147,7 @@ namespace System.Data.OleDb
 			set { list[index] = value; }
 		}
 
-		object IDataParameterCollection.this[string name] {
+		object IDataParameterCollection.this [string index] {
 			[MonoTODO]
 			get {
 				throw new NotImplementedException ();
@@ -158,6 +157,7 @@ namespace System.Data.OleDb
 				throw new NotImplementedException ();
 			}
 		}
+#endif
 
 		internal IntPtr GdaParameterList {
 			[MonoTODO]
@@ -190,22 +190,22 @@ namespace System.Data.OleDb
 			return IndexOf (value);
 		}
 
-		public OleDbParameter Add (OleDbParameter parameter)
+		public OleDbParameter Add (OleDbParameter value)
 		{
-			if (parameter.Container != null)
+			if (value.Container != null)
 				throw new ArgumentException ("The OleDbParameter specified in the value parameter is already added to this or another OleDbParameterCollection.");
-			parameter.Container = this;
-			list.Add (parameter);
-			return parameter;
+			value.Container = this;
+			list.Add (value);
+			return value;
 		}
 
 #if NET_2_0
 		[Obsolete("OleDbParameterCollection.Add(string, value) is now obsolete. Use OleDbParameterCollection.AddWithValue(string, object) instead.")]
 		[EditorBrowsable(EditorBrowsableState.Never)]
 #endif
-		public OleDbParameter Add (string name, object value)
+		public OleDbParameter Add (string parameterName, object value)
 		{
-			return Add (new OleDbParameter (name, value));
+			return Add (new OleDbParameter (parameterName, value));
 		}
 
 #if NET_2_0
@@ -215,19 +215,19 @@ namespace System.Data.OleDb
 		}
 #endif
 
-		public OleDbParameter Add (string name, OleDbType type)
+		public OleDbParameter Add (string parameterName, OleDbType oleDbType)
 		{
-			return Add (new OleDbParameter (name, type));
+			return Add (new OleDbParameter (parameterName, oleDbType));
 		}
 
-		public OleDbParameter Add (string name, OleDbType type, int width)
+		public OleDbParameter Add (string parameterName, OleDbType oleDbType, int size)
 		{
-			return Add (new OleDbParameter (name, type, width));
+			return Add (new OleDbParameter (parameterName, oleDbType, size));
 		}
 
-		public OleDbParameter Add (string name, OleDbType type, int width, string src_col)
+		public OleDbParameter Add (string parameterName, OleDbType oleDbType, int size, string sourceColumn)
 		{
-			return Add (new OleDbParameter (name, type, width, src_col));
+			return Add (new OleDbParameter (parameterName, oleDbType, size, sourceColumn));
 		}
 
 #if NET_2_0

+ 4 - 2
mcs/class/System.Data/System.Data.OleDb/OleDbTransaction.cs

@@ -110,13 +110,13 @@ namespace System.Data.OleDb
 		protected override DbConnection DbConnection {
 			get { return connection; }
 		}
-#endif
-
+#else
 		IDbConnection IDbTransaction.Connection {
 			get {
 				return connection;
 			}
 		}
+#endif
 		
 		public
 #if NET_2_0
@@ -199,10 +199,12 @@ namespace System.Data.OleDb
 #endif
 		}
 
+#if !NET_2_0
 		void IDisposable.Dispose ()
 		{
 			Dispose (true);
 		}
+#endif
 
 		public
 #if NET_2_0