Index: System.Data.SQLite/SQLiteTransaction.cs
==================================================================
--- System.Data.SQLite/SQLiteTransaction.cs
+++ System.Data.SQLite/SQLiteTransaction.cs
@@ -10,21 +10,33 @@
using System;
using System.Data;
using System.Data.Common;
using System.Threading;
+ ///////////////////////////////////////////////////////////////////////////////////////////////
+
///
/// SQLite implementation of DbTransaction.
///
public sealed class SQLiteTransaction : DbTransaction
{
///
/// The connection to which this transaction is bound
///
internal SQLiteConnection _cnn;
- internal int _version; // Matches the version of the connection
+
+ ///
+ /// Matches the version of the connection.
+ ///
+ private int _version;
+
+ ///
+ /// The isolation level for this transaction.
+ ///
private IsolationLevel _level;
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
///
/// Constructs the transaction object, binding it to the supplied connection
///
/// The connection to open a transaction on
@@ -134,33 +146,41 @@
}
_cnn._transactionLevel--;
_cnn = null;
}
+ ///////////////////////////////////////////////////////////////////////////////////////////////
+
///
/// Returns the underlying connection to which this transaction applies.
///
public new SQLiteConnection Connection
{
get { CheckDisposed(); return _cnn; }
}
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
///
/// Forwards to the local Connection property
///
protected override DbConnection DbConnection
{
get { return Connection; }
}
+ ///////////////////////////////////////////////////////////////////////////////////////////////
+
///
/// Gets the isolation level of the transaction. SQLite only supports Serializable transactions.
///
public override IsolationLevel IsolationLevel
{
get { CheckDisposed(); return _level; }
}
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
///
/// Rolls back the active transaction.
///
public override void Rollback()
@@ -168,10 +188,12 @@
CheckDisposed();
SQLiteConnection.Check(_cnn);
IsValid(true);
IssueRollback(true);
}
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
internal void IssueRollback(bool throwError)
{
SQLiteConnection cnn = Interlocked.Exchange(ref _cnn, null);
@@ -191,10 +213,12 @@
throw;
}
cnn._transactionLevel = 0;
}
}
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////
internal bool IsValid(bool throwError)
{
if (_cnn == null)
{