/// <summary>
 /// Finds state matching given parameters
 /// </summary>
 /// <param name="scope">Scope to search</param>
 /// <param name="query">Query to action</param>
 /// <param name="pageIndex">Index of page to retrieve</param>
 /// <param name="pageSize">Size of page to retrieve</param>
 /// <returns>Matching state</returns>
 public FindStateResult FindState(PersonalizationScope scope, PersonalizationStateQuery query, int pageIndex, int pageSize)
 {
     int totalRecords = 0;
     PersonalizationStateInfoCollection collection = Provider.FindState(scope, query, pageIndex, pageSize, out totalRecords);
     FindStateResult result = new FindStateResult();
     result.TotalRecords = totalRecords;
     result.StateInfoCollection = collection;
     return result;
 }
        /// <summary>
        /// Finds state matching given parameters
        /// </summary>
        /// <param name="scope">Scope to search</param>
        /// <param name="query">Query to action</param>
        /// <param name="pageIndex">Index of page to retrieve</param>
        /// <param name="pageSize">Size of page to retrieve</param>
        /// <returns>Matching state</returns>
        public FindStateResult FindState(PersonalizationScope scope, PersonalizationStateQuery query, int pageIndex, int pageSize)
        {
            int totalRecords = 0;
            PersonalizationStateInfoCollection collection = Provider.FindState(scope, query, pageIndex, pageSize, out totalRecords);
            FindStateResult result = new FindStateResult();

            result.TotalRecords        = totalRecords;
            result.StateInfoCollection = collection;
            return(result);
        }