Browse Source

* OdbcTransaction.cs: fixed signature to match MS.NET

svn path=/trunk/mcs/; revision=26987
Gert Driesen 21 years ago
parent
commit
def3354f3b

+ 3 - 0
mcs/class/System.Data/System.Data.Odbc/ChangeLog

@@ -1,3 +1,6 @@
+2004-05-09  Gert Driesen ([email protected])
+	* OdbcTransaction.cs: fixed signature to match MS.NET
+
 2004-05-09  Gert Driesen ([email protected])
 	* OdbcType.cs: fixed typo UniqueIndetifier
 	* OdbcColumn.cs : fixed typo UniqueIndetifier

+ 38 - 22
mcs/class/System.Data/System.Data.Odbc/OdbcTransaction.cs

@@ -11,10 +11,7 @@ using System.Data;
 
 namespace System.Data.Odbc
 {
-	/// <summary>
-	/// Summary description for OdbcTransaction.
-	/// </summary>
-	public class OdbcTransaction : MarshalByRefObject, IDbTransaction
+	public sealed class OdbcTransaction : MarshalByRefObject, IDbTransaction
 	{
 		private bool disposed = false;
 		private OdbcConnection connection;
@@ -32,7 +29,7 @@ namespace System.Data.Odbc
 			{
 				case IsolationLevel.ReadUncommitted:
 					lev=1;
-					break;				
+					break;
 				case IsolationLevel.ReadCommitted:
 					lev=2;
 					break;
@@ -55,6 +52,26 @@ namespace System.Data.Odbc
 			connection=conn;
 		}
 
+		#region Implementation of IDisposable
+
+		private void Dispose(bool disposing) {
+			if (!disposed) {
+				if (disposing) {
+					Rollback();
+				}
+				disposed = true;
+			}
+		}
+
+		void IDisposable.Dispose() {
+			Dispose(true);
+			GC.SuppressFinalize(this);
+		}
+
+		#endregion Implementation of IDisposable
+
+		#region Implementation of IDbTransaction
+
 		public void Commit()
 		{
 			if (connection.transaction==this)
@@ -81,35 +98,34 @@ namespace System.Data.Odbc
 				throw new InvalidOperationException();
 		}
 
-		public IDbConnection Connection
+		IDbConnection IDbTransaction.Connection
 		{
-			get {
-				return connection;
+			get
+			{
+				return Connection;
 			}
 		}
-		
+
 		public IsolationLevel IsolationLevel
 		{
-			get {
+			get
+			{
 				return isolationlevel;
 			}
 		}
 
-		private void Dispose (bool disposing)
-		{
-			if (!disposed)  {
-				if (disposing) {
-					Rollback ();
-				}
-				disposed = true;
-			}
-		}
+		#endregion Implementation of IDbTransaction
+
+		#region Public Instance Properties
 
-		public void Dispose ()
+		public OdbcConnection Connection
 		{
-			Dispose (true);
-			GC.SuppressFinalize (this);
+			get
+			{
+				return connection;
+			}
 		}
 
+		#endregion Public Instance Properties
 	}
 }