BudgetAnalyser.Engine.Services.DashboardService.PreparePersistentStateData C# (CSharp) Method

PreparePersistentStateData() public method

public PreparePersistentStateData ( ) : WidgetsApplicationState
return BudgetAnalyser.Engine.Widgets.WidgetsApplicationState
        public WidgetsApplicationState PreparePersistentStateData()
        {
            IEnumerable<WidgetGroup> widgetStates = WidgetGroups?.ToList() ?? new List<WidgetGroup>();
            return new WidgetsApplicationState
            {
                WidgetStates = widgetStates.SelectMany(group => group.Widgets).Select(CreateWidgetState).ToList()
            };
        }