/// <exception cref="System.Exception"></exception> public static void AssertAllSlotsFreed(LocalTransaction trans, BTree bTree, ICodeBlock block) { LocalObjectContainer container = (LocalObjectContainer)trans.Container(); ITransactionalIdSystem idSystem = trans.IdSystem(); IEnumerator allSlotIDs = bTree.AllNodeIds(trans.SystemTransaction()); Collection4 allSlots = new Collection4(); while (allSlotIDs.MoveNext()) { int slotID = ((int)allSlotIDs.Current); Slot slot = idSystem.CurrentSlot(slotID); allSlots.Add(slot); } Slot bTreeSlot = idSystem.CurrentSlot(bTree.GetID()); allSlots.Add(bTreeSlot); Collection4 freedSlots = new Collection4(); IFreespaceManager freespaceManager = container.FreespaceManager(); container.InstallDebugFreespaceManager(new FreespaceManagerForDebug(new _ISlotListener_99 (freedSlots))); block.Run(); container.InstallDebugFreespaceManager(freespaceManager); Assert.IsTrue(freedSlots.ContainsAll(allSlots.GetEnumerator())); }
public ObjectContainerBase Stream() { return(i_trans.Container()); }