Example #1
0
        private int RemoveFromListHead(ref UsagePageList list)
        {
            int pageIndex = list._head;

            this.RemoveFromList(pageIndex, ref list);
            return(pageIndex);
        }
Example #2
0
 private void MoveToListTail(int pageIndex, ref UsagePageList list)
 {
     if (list._tail != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListTail(pageIndex, ref list);
     }
 }
Example #3
0
 private void MoveToListHead(int pageIndex, ref UsagePageList list)
 {
     if (list._head != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListHead(pageIndex, ref list);
     }
 }
Example #4
0
 private void AddToListTail(int pageIndex, ref UsagePageList list)
 {
     this._pages[pageIndex]._pageNext = -1;
     this._pages[pageIndex]._pagePrev = list._tail;
     if (list._tail != -1)
     {
         this._pages[list._tail]._pageNext = pageIndex;
     }
     else
     {
         list._head = pageIndex;
     }
     list._tail = pageIndex;
 }
Example #5
0
 private void AddToListHead(int pageIndex, ref UsagePageList list)
 {
     this._pages[pageIndex]._pagePrev = -1;
     this._pages[pageIndex]._pageNext = list._head;
     if (list._head != -1)
     {
         this._pages[list._head]._pagePrev = pageIndex;
     }
     else
     {
         list._tail = pageIndex;
     }
     list._head = pageIndex;
 }
Example #6
0
 private void RemoveFromList(int pageIndex, ref UsagePageList list)
 {
     if (this._pages[pageIndex]._pagePrev != -1)
     {
         this._pages[this._pages[pageIndex]._pagePrev]._pageNext = this._pages[pageIndex]._pageNext;
     }
     else
     {
         list._head = this._pages[pageIndex]._pageNext;
     }
     if (this._pages[pageIndex]._pageNext != -1)
     {
         this._pages[this._pages[pageIndex]._pageNext]._pagePrev = this._pages[pageIndex]._pagePrev;
     }
     else
     {
         list._tail = this._pages[pageIndex]._pagePrev;
     }
     this._pages[pageIndex]._pagePrev = -1;
     this._pages[pageIndex]._pageNext = -1;
 }
 private int RemoveFromListHead(ref UsagePageList list)
 {
     int pageIndex = list._head;
     this.RemoveFromList(pageIndex, ref list);
     return pageIndex;
 }
 private void RemoveFromList(int pageIndex, ref UsagePageList list)
 {
     if (this._pages[pageIndex]._pagePrev != -1)
     {
         this._pages[this._pages[pageIndex]._pagePrev]._pageNext = this._pages[pageIndex]._pageNext;
     }
     else
     {
         list._head = this._pages[pageIndex]._pageNext;
     }
     if (this._pages[pageIndex]._pageNext != -1)
     {
         this._pages[this._pages[pageIndex]._pageNext]._pagePrev = this._pages[pageIndex]._pagePrev;
     }
     else
     {
         list._tail = this._pages[pageIndex]._pagePrev;
     }
     this._pages[pageIndex]._pagePrev = -1;
     this._pages[pageIndex]._pageNext = -1;
 }
 private void MoveToListTail(int pageIndex, ref UsagePageList list)
 {
     if (list._tail != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListTail(pageIndex, ref list);
     }
 }
 private void MoveToListHead(int pageIndex, ref UsagePageList list)
 {
     if (list._head != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListHead(pageIndex, ref list);
     }
 }
 private void AddToListTail(int pageIndex, ref UsagePageList list)
 {
     this._pages[pageIndex]._pageNext = -1;
     this._pages[pageIndex]._pagePrev = list._tail;
     if (list._tail != -1)
     {
         this._pages[list._tail]._pageNext = pageIndex;
     }
     else
     {
         list._head = pageIndex;
     }
     list._tail = pageIndex;
 }
 private void AddToListHead(int pageIndex, ref UsagePageList list)
 {
     this._pages[pageIndex]._pagePrev = -1;
     this._pages[pageIndex]._pageNext = list._head;
     if (list._head != -1)
     {
         this._pages[list._head]._pagePrev = pageIndex;
     }
     else
     {
         list._tail = pageIndex;
     }
     list._head = pageIndex;
 }