private void Cleanup(SqliteAdoConnection cnn) { if (_disposeConnection) cnn.Dispose(); _transaction = null; _scope = null; }
internal SqliteEnlistment(SqliteAdoConnection cnn, Transaction scope) { _transaction = cnn.BeginTransaction(); _scope = scope; _disposeConnection = false; _scope.EnlistVolatile(this, Portable.Transactions.EnlistmentOptions.None); }
internal Transaction(Transaction other) { this.level = other.level; this.info = other.info; this.dependents = other.dependents; this.volatiles = other.Volatiles; this.durables = other.Durables; this.pspe = other.Pspe; }
public virtual void EnlistTransaction(Transaction transaction) { throw new NotSupportedException(); }
public TransactionScope(Transaction transaction, TimeSpan timeout, DTCOption opt) { this.Initialize(TransactionScopeOption.Required, transaction, defaultOptions, opt, timeout); }
public TransactionScope(Transaction transaction, TimeSpan timeout) : this(transaction, timeout, DTCOption.None) { }
public TransactionScope(Transaction transaction) : this(transaction, TransactionManager.DefaultTimeout) { }
private Transaction InitTransaction(Transaction tx, TransactionScopeOption scopeOption) { if (tx != null) { return tx; } if (scopeOption == TransactionScopeOption.Suppress) { if (Transaction.CurrentInternal != null) { this.parentScope = Transaction.CurrentInternal.Scope; } return null; } if (scopeOption == TransactionScopeOption.Required) { if (Transaction.CurrentInternal == null) { this.isRoot = true; return new Transaction(); } this.parentScope = Transaction.CurrentInternal.Scope; return Transaction.CurrentInternal; } /* RequiresNew */ if (Transaction.CurrentInternal != null) { this.parentScope = Transaction.CurrentInternal.Scope; } this.isRoot = true; return new Transaction(); }
private void Initialize(TransactionScopeOption scopeOption, Transaction tx, TransactionOptions options, DTCOption interop, TimeSpan timeout) { this.completed = false; this.isRoot = false; this.nested = 0; this.timeout = timeout; this.oldTransaction = Transaction.CurrentInternal; Transaction.CurrentInternal = this.transaction = this.InitTransaction(tx, scopeOption); if (this.transaction != null) { this.transaction.InitScope(this); } if (this.parentScope != null) { this.parentScope.nested ++; } }
internal PreparingEnlistment(Transaction tx, IEnlistmentNotification enlisted) { this.tx = tx; this.enlisted = enlisted; this.waitHandle = new ManualResetEvent(false); }
// FIXME: Check whether this is correct (currently, GetHashCode() uses 'dependents' but this doesn't) private bool Equals(Transaction t) { if (ReferenceEquals(t, this)) { return true; } if (ReferenceEquals(t, null)) { return false; } return this.level == t.level && this.info == t.info; }
internal TransactionEventArgs(Transaction transaction) : this() { this.transaction = transaction; }
internal SinglePhaseEnlistment(Transaction tx, object abortingEnlisted) { this.tx = tx; this.abortingEnlisted = abortingEnlisted; }
internal DependentTransaction(Transaction parent, DependentCloneOption option) { // this.parent = parent; // this.option = option; }