Esempio n. 1
0
        public void Push(BreadCrumb bc)
        {
            if (bc.LinkName.IsNullOrWhiteSpace())
            {
                return;
            }
            if (bc.Url.IsNullOrWhiteSpace())
            {
                return;
            }
            if (bc.Url == "#")
            {
                return;
            }
            if (!BreadCrumbStack.IsNull())
            {
                if (BreadCrumbStack.Count > 0)
                {
                    if (BreadCrumbStack.Peek().Url == bc.Url)
                    {
                        return;
                    }
                }
            }

            BreadCrumbStack.Push(bc);
            SaveToMemory();
        }
Esempio n. 2
0
 public BreadCrumb[] ToArray()
 {
     if (BreadCrumbStack.IsNull())
     {
         Console.WriteLine("BreadCrumbStack is null");
         return(null);
     }
     return(BreadCrumbStack.ToArray());
 }