Beispiel #1
0
        public ViewSpecList ReplaceView(string oldName, ViewSpecLayout newView)
        {
            List <ViewSpecLayout> items = new List <ViewSpecLayout>();
            bool found = false;

            foreach (var item in ViewSpecLayouts)
            {
                if (item.Name != oldName)
                {
                    items.Add(item);
                    continue;
                }
                found = true;
                if (newView != null)
                {
                    items.Add(newView);
                }
            }
            if (!found && null != newView)
            {
                items.Add(newView);
            }
            return(new ViewSpecList(items));
        }
Beispiel #2
0
 protected bool Equals(ViewSpecLayout other)
 {
     return(Equals(ViewSpec, other.ViewSpec) && Equals(ViewLayoutList, other.ViewLayoutList));
 }