Esempio n. 1
0
        /// <summary>
        /// Adds the category.
        /// </summary>
        /// <param name="pageLinks">The page links.</param>
        /// <param name="categoryName">Name of the category.</param>
        /// <param name="categoryId">The category identifier.</param>
        /// <returns>Returns the Page links including the Category</returns>
        public static PageLinks AddCategory(
            this PageLinks pageLinks,
            [NotNull] string categoryName,
            [NotNull] int categoryId)
        {
            CodeContracts.VerifyNotNull(pageLinks, "pageLinks");
            CodeContracts.VerifyNotNull(categoryName, "categoryName");

            pageLinks.AddLink(categoryName, BuildLink.GetCategoryLink(categoryId, categoryName));

            return(pageLinks);
        }