Interface IDashboardService
Dashboard service for managing user dashboards and widgets.
Namespace: DataWeb.Dashboard
Assembly: DataWeb.Core.dll
Syntax
public interface IDashboardService
Methods
GetAllWidgetsAsync(CancellationToken)
Retrieves all available widgets asynchronously.
Declaration
Task<IEnumerable<Widget>> GetAllWidgetsAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<Widget>> | Returns a Task<TResult> representing the collection of all available widgets. |
GetUserPanelAsync(IUser, CancellationToken)
Get user panel asynchronously.
Declaration
Task<Panel> GetUserPanelAsync(IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Panel> | Returns a Task<TResult> representing the user panel. |
GetUserWidgetsAsync(IUser, CancellationToken)
Retrieves widgets accessible to the specified user asynchronously.
Declaration
Task<IEnumerable<Widget>> GetUserWidgetsAsync(IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<Widget>> | Returns a Task<TResult> representing the collection of widgets accessible to the user. |
InitUserPanelAsync(IUser, CancellationToken)
Initializes a new user panel with default widgets asynchronously.
Declaration
Task<Panel> InitUserPanelAsync(IUser user, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | The IUser object representing the user. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<Panel> | Returns a Task<TResult> representing the initialized user panel. |
SavePanelAsync(Panel)
Saves a user panel asynchronously.
Declaration
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 Task representing the asynchronous save operation. |