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(); }
public BreadCrumb[] ToArray() { if (BreadCrumbStack.IsNull()) { Console.WriteLine("BreadCrumbStack is null"); return(null); } return(BreadCrumbStack.ToArray()); }