public void UpdatePageInformation(PageInformation pageInformation)
 {
     if (pageInformation == null) return;
     switch (pageInformation.Move)
     {
         case PagingNavigationMove.Next:
             CurrentIndex++;
             if (CurrentIndex == Queries.Count() - 1)
             {
                 Queries.Add(pageInformation.Query);
             }
             break;
         case PagingNavigationMove.Previous:
             CurrentIndex--;
             break;
         case PagingNavigationMove.Current:
             if (CurrentIndex == Queries.Count() - 1)
             {
                 Queries.Add(pageInformation.Query);
             }
             break;
         case PagingNavigationMove.Reset:
             CurrentIndex = 0;
             ResetQueries();
             Queries.Add(pageInformation.Query);
             break;
         default:
             break;
     }
 }
 public PageInformation GetPageInformation(PagingNavigationMove navigationMove)
 {
     PageInformation result = null;
     switch (navigationMove)
     {
         case PagingNavigationMove.Next:
             result = new PageInformation(CurrentIndex + 1, Queries[CurrentIndex + 1], navigationMove);
             break;
         case PagingNavigationMove.Previous:
             result = new PageInformation(CurrentIndex - 1, Queries[CurrentIndex - 1], navigationMove);
             break;
         case PagingNavigationMove.Current:
             result = new PageInformation(CurrentIndex, Queries[CurrentIndex], navigationMove);
             break;
         case PagingNavigationMove.Reset:
             result = new PageInformation(0, "Paged=TRUE&p_ID=0", PagingNavigationMove.Reset);
             break;
     }
     return result;
 }