Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
 protected bool Equals(ViewSpecLayout other)
 {
     return(Equals(ViewSpec, other.ViewSpec) && Equals(ViewLayoutList, other.ViewLayoutList));
 }