DataWeb
Search Results for

    Show / Hide Table of Contents

    Class DashboardService

    Dashboard service for managing user dashboards and widgets.

    Inheritance
    object
    DashboardService
    Implements
    IDashboardService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Dashboard
    Assembly: DataWeb.Core.dll
    Syntax
    public class DashboardService : IDashboardService

    Constructors

    DashboardService(IReflectionService, IAppErrorService, IStructureService, IDashboardPanelStore, IDashboardWidgetStore, IServiceProvider)

    Dashboard service for managing user dashboards and widgets.

    Declaration
    public DashboardService(IReflectionService reflectionService, IAppErrorService appErrorService, IStructureService structureService, IDashboardPanelStore panelStore, IDashboardWidgetStore widgetStore, IServiceProvider serviceProvider)
    Parameters
    Type Name Description
    IReflectionService reflectionService
    IAppErrorService appErrorService
    IStructureService structureService
    IDashboardPanelStore panelStore
    IDashboardWidgetStore widgetStore
    IServiceProvider serviceProvider

    Methods

    GetAllWidgetsAsync(CancellationToken)

    Retrieves all available dashboard widgets asynchronously.

    Declaration
    public Task<IEnumerable<DashboardWidget>> GetAllWidgetsAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Type Description
    Task<IEnumerable<DashboardWidget>>

    A Task<TResult> representing the collection of all available widgets.

    GetUserPanelAsync(IUser, CancellationToken)

    Retrieves the user's dashboard panel asynchronously.

    Declaration
    public Task<DashboardPanel> GetUserPanelAsync(IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IUser user

    The IUser object representing the user.

    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Type Description
    Task<DashboardPanel>

    A Task<TResult> representing the user's dashboard panel, or null if not found.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when user is null.

    GetUserWidgetsAsync(IUser, CancellationToken)

    Retrieves widgets accessible to the specified user asynchronously.

    Declaration
    public Task<IEnumerable<DashboardWidget>> GetUserWidgetsAsync(IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IUser user

    The IUser object representing the user.

    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Type Description
    Task<IEnumerable<DashboardWidget>>

    A Task<TResult> representing the collection of widgets accessible to the user.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when user is null.

    InitUserPanelAsync(IUser, CancellationToken)

    Initializes a new user panel with default widgets asynchronously.

    Declaration
    public Task<DashboardPanel> InitUserPanelAsync(IUser user, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    IUser user

    The IUser object representing the user.

    CancellationToken cancellationToken

    A cancellation token.

    Returns
    Type Description
    Task<DashboardPanel>

    A Task<TResult> representing the initialized user panel.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when user is null.

    SavePanelAsync(DashboardPanel)

    Saves a user panel asynchronously.

    Declaration
    public Task SavePanelAsync(DashboardPanel panel)
    Parameters
    Type Name Description
    DashboardPanel panel

    The DashboardPanel object representing the user panel to be saved.

    Returns
    Type Description
    Task

    A Task representing the asynchronous save operation.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when panel is null.

    Implements

    IDashboardService
    In this article
    Back to top Generated by DocFX