* OdbcParameterTest.cs: Fixed compilation on 1.0 profile.
[mono.git] / mcs / class / System.Data / System.Data.Common / DbTransaction.cs
index c1b7f04dbd6c7eb05eb3d255a4fa3cf9e5c352ab..ecd803de560ba9e6dbcc2ac8e05b92c7ce8641eb 100644 (file)
@@ -1,12 +1,10 @@
-//
+
 // System.Data.Common.DbTransaction.cs
 //
 // Author:
 //   Tim Coleman (tim@timcoleman.com)
 //
 // Copyright (C) Tim Coleman, 2003
-//
-
 //
 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0
+#if NET_2_0 || TARGET_JVM
 
-namespace System.Data.Common {
+namespace System.Data.Common
+{
        public abstract class DbTransaction : MarshalByRefObject, IDbTransaction, IDisposable
        {
                #region Constructors
 
-               [MonoTODO]
                protected DbTransaction ()
                {
                }
@@ -50,24 +48,37 @@ namespace System.Data.Common {
                        get { return DbConnection; }
                }
 
-               protected abstract DbConnection DbConnection { get; }
+               protected abstract DbConnection DbConnection {
+                       get;
+               }
 
                IDbConnection IDbTransaction.Connection {
                        get { return (IDbConnection) Connection; }
                }
 
-               public abstract IsolationLevel IsolationLevel { get; }
+               public abstract IsolationLevel IsolationLevel {
+                       get;
+               }
 
                #endregion // Properties
 
                #region Methods
 
                public abstract void Commit ();
-               public abstract void Dispose ();
+
                public abstract void Rollback ();
 
+               public void Dispose ()
+               {
+                       Dispose (true);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+               }
+
                #endregion // Methods
        }
 }
 
-#endif // NET_2_0
+#endif