// METHODS
        /// <summary>
        /// Build pagination
        /// </summary>
        /// <param name="pagination">
        /// Pagination model with data
        /// </param>
        /// <returns>
        /// The class that can create HTML elements
        /// </returns>
        public TagBuilder Build(Pagination pagination)
        {
            PaginationLimit limits = pagination.CalcPagintaionLimits();

            Interfaces.IPaginationBuilder builder = pagination.PaginationBuilder;

            TagBuilder body = builder.BuildBody();

            // previous
            body.InnerHtml.AppendHtml(builder.GenerateLink(CreateLinkInfo(LinkInfoType.Previous, pagination, -1), pagination.UrlInfo));

            // middle area
            for (int page = limits.StartPage; page <= limits.EndPage; ++page)
            {
                if (page == pagination.CurrentPage)
                {
                    body.InnerHtml.AppendHtml(builder.GenerateLink(CreateLinkInfo(LinkInfoType.Current, pagination, page), pagination.UrlInfo));
                }
                else
                {
                    body.InnerHtml.AppendHtml(builder.GenerateLink(CreateLinkInfo(LinkInfoType.Regular, pagination, page), pagination.UrlInfo));
                }
            }

            // next
            body.InnerHtml.AppendHtml(builder.GenerateLink(CreateLinkInfo(LinkInfoType.Next, pagination, -1), pagination.UrlInfo));

            return(body);
        }