private void EnlistmentCompleted(object sender, EventArgs e)
 {
     this.enlistmentNotification = null;
 }
        public void EnlistTransaction(System.Transactions.Transaction transaction)
        {
            if (this.owningConnection != null && this.options.Enlist)
            {
                if (this.enlistmentNotification != null && this.enlistmentNotification.SystemTransaction == transaction)
                    return;

                if (this.HasActiveTransaction)
                {
                    throw new ArgumentException("Unable to enlist in transaction, a local transaction already exists");
                }
                if (this.enlistmentNotification != null)
                {
                    throw new ArgumentException("Already enlisted in a transaction");
                }

                this.enlistmentNotification = new FbEnlistmentNotification(this, transaction);
                this.enlistmentNotification.Completed += new EventHandler(EnlistmentCompleted);
            }
        }