public CellLoop() { this.transaction = TransactionInternal.GetCurrentTransaction(); if (this.transaction == null) { throw new InvalidOperationException("Loop must be created within an explicit transaction."); } this.transaction.Last( () => { if (this.transaction != null) { this.transaction = null; throw new InvalidOperationException("Loop was not looped."); } }); }