Ejemplo n.º 1
0
        public Breadcrumb Add(string name, string href)
        {
            var exists = this._breadcrumbs.TryGetValue(this._currentKey, out BreadcrumbPairs crumbs);

            if (!exists)
            {
                crumbs = new BreadcrumbPairs();
                this._breadcrumbs.Add(this._currentKey, crumbs);
            }

            crumbs.Add(name, href);
            return(this);
        }
Ejemplo n.º 2
0
        public IEnumerator <KeyValuePair <string, string> > GetEnumerator()
        {
            var exists = this._breadcrumbs.TryGetValue(KEY_ALWAYS_USE, out BreadcrumbPairs crumbsToAlwaysShow);

            if (!exists)
            {
                crumbsToAlwaysShow = new BreadcrumbPairs();
            }

            var otherCrumbs = new BreadcrumbPairs();

            if (this._keyToUse != KEY_ALWAYS_USE)
            {
                this._breadcrumbs.TryGetValue(this._keyToUse, out otherCrumbs);
            }

            return(crumbsToAlwaysShow.Concat(otherCrumbs).GetEnumerator());
        }