/// <summary>
        /// Writes the current context to the specified <see cref="XmlWriter"/>.
        /// </summary>
        /// <param name="writer">The <b>XmlWriter</b> to which you want to write the current context.</param>
        /// <param name="xmlNamespace">The XML namespace used to qualify prefixed syndication extension elements and attributes.</param>
        /// <exception cref="ArgumentNullException">The <paramref name="writer"/> is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="ArgumentNullException">The <paramref name="xmlNamespace"/> is a null reference (Nothing in Visual Basic).</exception>
        /// <exception cref="ArgumentNullException">The <paramref name="xmlNamespace"/> is an empty string.</exception>
        public void WriteTo(XmlWriter writer, string xmlNamespace)
        {
            //------------------------------------------------------------
            //	Validate parameter
            //------------------------------------------------------------
            Guard.ArgumentNotNull(writer, "writer");
            Guard.ArgumentNotNullOrEmptyString(xmlNamespace, "xmlNamespace");

            //------------------------------------------------------------
            //	Write current extension details to the writer
            //------------------------------------------------------------

            if (ItemsPerPage != null)
            {
                writer.WriteElementString("itemsPerPage", xmlNamespace, ItemsPerPage.ToString());
            }

            if (TotalResults != null)
            {
                writer.WriteElementString("totalResults", xmlNamespace, TotalResults.ToString());
            }

            if (StartIndex != null)
            {
                writer.WriteElementString("startIndex", xmlNamespace, StartIndex.ToString());
            }
        }
 IReadOnlyList <KeyValuePair <string, string> > IParameterSet.GetQueryParameters()
 => new[]
 {
     new KeyValuePair <string, string>("current", CurrentPage.ToString()),
     new KeyValuePair <string, string>("rowCount", ItemsPerPage.ToString()),
     new KeyValuePair <string, string>("searchPhrase", SearchPhrase),
 };