public void EnlistTransaction(System.Transactions.Transaction transaction) { if (_owningConnection != null) { if (_enlistmentNotification != null && _enlistmentNotification.SystemTransaction == transaction) { return; } if (HasActiveTransaction) { throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists"); } if (_enlistmentNotification != null) { throw new ArgumentException("Already enlisted in a transaction"); } _enlistmentNotification = new FbEnlistmentNotification(this, transaction); _enlistmentNotification.Completed += new EventHandler(EnlistmentCompleted); } }
private void EnlistmentCompleted(object sender, EventArgs e) { _enlistmentNotification = null; }