public void AddItem(BreadcrumbsItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            _items.Add(item);
        }
Example #2
0
        public void AddItem(BreadcrumbsItem item)
        {
            if (item == null)
            {
                throw new ArgumentNullException(nameof(item));
            }

            if (item.IsCurrentPage && HasCurrentPageItem)
            {
                throw new InvalidOperationException("An item representing the current page has already been added.");
            }

            _items.Add(item);
        }
 internal static void SetActionBreadcrumb(this ViewDataDictionary viewData, BreadcrumbsItem breadcrumbItem)
 {
     viewData[BreadcrumbsActionItem] = breadcrumbItem;
 }
        public void AddItem(BreadcrumbsItem item)
        {
            Guard.ArgumentNotNull(nameof(item), item);

            _items.Add(item);
        }
 internal static void SetControllerBreadcrumb(this ViewDataDictionary viewData, BreadcrumbsItem breadcrumbItem)
 {
     viewData[BreadcrumbsControllerItem] = breadcrumbItem;
 }