2008-08-26 Daniel Morgan <monodanmorg@yahoo.com>
[mono.git] / mcs / class / System.Data.OracleClient / System.Data.OracleClient / OracleTransaction.cs
index 4c1af969f696b029335e0a72b804129b94b0f09e..77a4af6f8315b44cad014961640299d77a4f9935 100644 (file)
@@ -19,8 +19,14 @@ using System.ComponentModel;
 using System.Data;
 using System.Data.OracleClient.Oci;
 
-namespace System.Data.OracleClient {
-       public sealed class OracleTransaction : MarshalByRefObject, IDbTransaction, IDisposable
+namespace System.Data.OracleClient
+{
+       public sealed class OracleTransaction :
+#if NET_2_0
+       Common.DbTransaction
+#else
+       MarshalByRefObject, IDbTransaction, IDisposable
+#endif
        {
                #region Fields
 
@@ -50,17 +56,34 @@ namespace System.Data.OracleClient {
                        get { return isOpen; }
                }
 
-               public OracleConnection Connection {
+               public
+#if NET_2_0
+               new
+#endif
+               OracleConnection Connection {
                        get { return connection; }
                }
+               
+#if NET_2_0
+               [MonoTODO]
+               protected override Common.DbConnection DbConnection {
+                       get { return Connection; }
+               }
+#endif
 
-               public IsolationLevel IsolationLevel {
+               public
+#if NET_2_0
+               override
+#endif
+               IsolationLevel IsolationLevel {
                        get { return isolationLevel; }
                }
 
+#if !NET_2_0
                IDbConnection IDbTransaction.Connection {
                        get { return Connection; }
                }
+#endif
 
                #endregion // Properties
 
@@ -71,14 +94,21 @@ namespace System.Data.OracleClient {
                        transaction.AttachToServiceContext ();
                }
 
-               public void Commit ()
+               public
+#if NET_2_0
+               override
+#endif
+               void Commit ()
                {
                        transaction.Commit ();
                        Connection.Transaction = null;
                        isOpen = false;
                }
 
-               private void Dispose (bool disposing)
+#if NET_2_0
+               protected override
+#endif
+               void Dispose (bool disposing)
                {
                        if (!disposed) {
                                if (disposing) {
@@ -91,13 +121,19 @@ namespace System.Data.OracleClient {
                        }
                }
 
+#if !NET_2_0
                public void Dispose ()
                {
                        Dispose (true);
                        GC.SuppressFinalize (this);
                }
+#endif
 
-               public void Rollback ()
+               public
+#if NET_2_0
+               override
+#endif
+               void Rollback ()
                {
                        transaction.Rollback ();
                        Connection.Transaction = null;