Class DashboardService
Dashboard service for managing user dashboards and widgets.
Inheritance
Implements
Inherited Members
Namespace: DataWeb.Dashboard
Assembly: DataWeb.Core.dll
Syntax
public class DashboardService : IDashboardService
Constructors
DashboardService(IReflectionService, IAppErrorService, IStructureService, IDashboardPanelStore, IDashboardWidgetStore, IServiceProvider)
Creates a new instance of DashboardService.
Declaration
public DashboardService(IReflectionService reflectionService, IAppErrorService appErrorService, IStructureService structureService, IDashboardPanelStore panelStore, IDashboardWidgetStore widgetStore, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IReflectionService | reflectionService | Service for accessing reflection. |
IAppErrorService | appErrorService | Service for logging application errors. |
IStructureService | structureService | Service for accessing the user's site structure. |
IDashboardPanelStore | panelStore | Store for accessing user dashboard panels. |
IDashboardWidgetStore | widgetStore | Store for accessing dashboard widgets. |
IServiceProvider | serviceProvider | Provider for accessing application services. |
Methods
GetAllWidgetsAsync()
Retrieves all available widgets asynchronously.
Declaration
public Task<IEnumerable<WidgetBase>> GetAllWidgetsAsync()
Returns
Type | Description |
---|---|
Task<IEnumerable<WidgetBase>> | Returns a System.Threading.Tasks.Task<TResult> representing the collection of all available widgets. |
GetUserPanelAsync(IUser)
Get user panel asynchronously.
Declaration
public Task<Panel> GetUserPanelAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
Returns
Type | Description |
---|---|
Task<Panel> | Returns a System.Threading.Tasks.Task<TResult> representing the user panel. |
GetUserWidgetsAsync(IUser)
Retrieves widgets accessible to the specified user asynchronously.
Declaration
public Task<IEnumerable<WidgetBase>> GetUserWidgetsAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
Returns
Type | Description |
---|---|
Task<IEnumerable<WidgetBase>> | Returns a System.Threading.Tasks.Task<TResult> representing the collection of widgets accessible to the user. |
InitUserPanelAsync(IUser)
Initializes a new user panel with default widgets asynchronously.
Declaration
public Task<Panel> InitUserPanelAsync(IUser user)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
Returns
Type | Description |
---|---|
Task<Panel> | Returns a System.Threading.Tasks.Task<TResult> representing the initialized user panel. |
SavePanelAsync(Panel)
Saves a user panel asynchronously.
Declaration
public Task SavePanelAsync(Panel panel)
Parameters
Type | Name | Description |
---|---|---|
Panel | panel | The Panel object representing the user panel to be saved. |
Returns
Type | Description |
---|---|
Task | A System.Threading.Tasks.Task representing the asynchronous save operation. |