private int RemoveFromListHead(ref ExpiresPageList list)
        {
            int pageIndex = list._head;

            this.RemoveFromList(pageIndex, ref list);
            return(pageIndex);
        }
 private void MoveToListTail(int pageIndex, ref ExpiresPageList list)
 {
     if (list._tail != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListTail(pageIndex, ref list);
     }
 }
 private void MoveToListHead(int pageIndex, ref ExpiresPageList list)
 {
     if (list._head != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListHead(pageIndex, ref list);
     }
 }
 private void AddToListTail(int pageIndex, ref ExpiresPageList 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 RemoveFromList(int pageIndex, ref ExpiresPageList 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 ExpiresPageList list)
 {
     int pageIndex = list._head;
     this.RemoveFromList(pageIndex, ref list);
     return pageIndex;
 }
 private void RemoveFromList(int pageIndex, ref ExpiresPageList 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 ExpiresPageList list)
 {
     if (list._tail != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListTail(pageIndex, ref list);
     }
 }
 private void MoveToListHead(int pageIndex, ref ExpiresPageList list)
 {
     if (list._head != pageIndex)
     {
         this.RemoveFromList(pageIndex, ref list);
         this.AddToListHead(pageIndex, ref list);
     }
 }
 private void AddToListTail(int pageIndex, ref ExpiresPageList 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;
 }