Esempio n. 1
0
 public SQLiteDataReaderED(DbCommand cmd, CommandBehavior behaviour, SQLiteTransactionED <TConn> txn = null, SQLiteTxnLockED <TConn> txnlock = null)
 {
     this._command     = cmd;
     this.InnerReader  = cmd.ExecuteReader(behaviour);
     this._transaction = txn;
     this._txnlock     = txnlock;
 }
Esempio n. 2
0
 protected void SetTransaction(DbTransaction txn)
 {
     // We only accept wrapped transactions in order to avoid deadlocks
     if (txn == null || txn is SQLiteTransactionED <TConn> )
     {
         _transaction             = (SQLiteTransactionED <TConn>)txn;
         InnerCommand.Transaction = _transaction.InnerTransaction;
     }
     else
     {
         throw new InvalidOperationException(String.Format("Expected a {0}; got a {1}", typeof(SQLiteTransactionED <TConn>).FullName, txn.GetType().FullName));
     }
 }
Esempio n. 3
0
 public SQLiteDataReaderED(DbCommand cmd, CommandBehavior behaviour, SQLiteTransactionED txn = null, SQLiteTxnLockED txnlock = null)
 {
     this._command = cmd;
     this.InnerReader = cmd.ExecuteReader(behaviour);
     this._transaction = txn;
     this._txnlock = txnlock;
 }
Esempio n. 4
0
 protected void SetTransaction(DbTransaction txn)
 {
     // We only accept wrapped transactions in order to avoid deadlocks
     if (txn == null || txn is SQLiteTransactionED)
     {
         _transaction = (SQLiteTransactionED)txn;
         InnerCommand.Transaction = _transaction.InnerTransaction;
     }
     else
     {
         throw new InvalidOperationException(String.Format("Expected a {0}; got a {1}", typeof(SQLiteTransactionED).FullName, txn.GetType().FullName));
     }
 }