Exemple #1
0
        private string ValidateFeedColumnLayout(LayoutType type, FeedColumnLayout defaultLayout)
        {
            foreach (var key in _layouts.Keys)
            {
                if (_layouts[key].LayoutType == type)
                {
                    return(key);
                }
            }

            string newkey = FeedColumnLayoutCollection.CreateNewKey();

            _layouts.Add(newkey, defaultLayout);
            // feedHandler.SaveColumLayouts();
            return(newkey);
        }
Exemple #2
0
        private static void SaveLayouts(IClientDataService dataService, FeedColumnLayoutCollection layouts)
        {
            if (dataService == null)
            {
                throw new ArgumentNullException("dataService");
            }

            if (!layouts.Modified)
            {
                return;
            }

            try
            {
                dataService.SaveColumnLayouts(layouts);
                layouts.Modified = false;
            }
            catch (Exception ex)
            {
                _log.Error("Could not save column layouts", ex);
            }
        }
Exemple #3
0
 /// <summary>
 /// Resets the layouts. They are re-loaded from storage on next request
 /// </summary>
 public void Reset()
 {
     _layouts = null;
 }