/// <summary> /// Iterate through a list and retrieve it's inqured enum value with instance ID /// </summary> /// <param name="query"></param> /// <param name="id"></param> /// <param name="list"></param> /// <returns></returns> protected ListNode BaseFind(Enum query, uint id, LinkList list) { ListNode foundNode = null; ListNode itr = list.Head; while (itr != null) { if (itr.GetName().Equals(query)) { if (itr.Id == id) { // Found node foundNode = itr; break; } } // Next node itr = itr.next; } return(foundNode); }
// Move the given node from one list to another private void Move(ListNode node, LinkList fromList, LinkList toList) { Debug.Assert(ReferenceEquals(fromList, toList) == false); node = fromList.Pop(node); toList.PushFront(node); }
// Constructor /// <summary> /// Make a manager WITHOUT preallocation /// </summary> protected AbstractManager() { this.activeList = new LinkList(); this.reservedList = new LinkList(); }