Exemple #1
0
        public void BeforeSerialization()
        {
            _tempParameters = ViewParameters.ToList();
            _tempCSS        = ViewCSS.ToList();

            //Remove parameters and CSS identical to config
            ViewParameters.RemoveAll(i => i.Value == null || i.Value == i.ConfigValue);
            ViewCSS.RemoveAll(i => i.Value == i.ConfigValue);
        }
        public void BeforeSerialization()
        {
            _tempParameters = ViewParameters.ToList();
            _tempCSS        = ViewCSS.ToList();

            //Remove parameters and CSS identical to config, or different from the current view value
            if (OverwriteFromCfg)
            {
                ViewParameters.RemoveAll(i => i.Value == null || i.Value == i.ConfigValue);
                ViewCSS.RemoveAll(i => i.Value == i.ConfigValue);
            }
            else
            {
                ViewParameters.RemoveAll(i => i.Value == null || View.Parameters.Exists(j => j.Name == i.Name && j.Value == i.Value));
                ViewCSS.RemoveAll(i => View.CSS.Exists(j => j.Name == i.Name && j.Value == i.Value));
            }
        }