DataWeb
Search Results for

    Show / Hide Table of Contents

    Class Area

    Represents an area in the application.

    Inheritance
    object
    Area
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Structure
    Assembly: DataWeb.Core.dll
    Syntax
    public sealed class Area

    Constructors

    Area(IReflectionService, IAppErrorService, IAuthorizationService, IAreaStore, IElementStore, ISectionStore, IViewStore)

    Represents an area in the application.

    Declaration
    public Area(IReflectionService reflectionService, IAppErrorService appErrorService, IAuthorizationService authorizationService, IAreaStore areaStore, IElementStore elementStore, ISectionStore sectionStore, IViewStore viewStore)
    Parameters
    Type Name Description
    IReflectionService reflectionService

    The IReflectionService instance used for reflection operations.

    IAppErrorService appErrorService

    The IAppErrorService instance used for error handling.

    IAuthorizationService authorizationService

    The authorization service used to check permissions.

    IAreaStore areaStore

    The store used to access area data.

    IElementStore elementStore

    The store used to access element data.

    ISectionStore sectionStore

    The store used to access section data.

    IViewStore viewStore

    The store used to access view data.

    Properties

    Color

    Gets or sets the color associated with the area.

    Declaration
    public string Color { get; set; }
    Property Value
    Type Description
    string

    IdMaster

    Gets or sets the unique identifier.

    Declaration
    public string IdMaster { get; set; }
    Property Value
    Type Description
    string

    IsCompleted

    Gets or sets a value indicating whether the area is completed.

    Declaration
    public bool IsCompleted { get; set; }
    Property Value
    Type Description
    bool

    Name

    Gets or sets the name of the area.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Navigation

    Gets or sets the navigation associated with the area.

    Declaration
    public Navigation Navigation { get; set; }
    Property Value
    Type Description
    Navigation

    Status

    Gets or sets the status of the area.

    Declaration
    public ItemStatus Status { get; set; }
    Property Value
    Type Description
    ItemStatus

    Title

    Gets or sets the title of the area.

    Declaration
    public string Title { get; set; }
    Property Value
    Type Description
    string

    Type

    Gets or sets the type of the area.

    Declaration
    public string Type { get; set; }
    Property Value
    Type Description
    string

    VisibleRoles

    Gets or sets the roles that are allowed to access this area.

    Declaration
    public List<string> VisibleRoles { get; set; }
    Property Value
    Type Description
    List<string>

    Methods

    GetAllSectionsAsync(CancellationToken)

    Asynchronously retrieves all the sections in the area.

    Declaration
    public Task<IEnumerable<Section>> GetAllSectionsAsync(CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IEnumerable<Section>>

    An enumerable of sections in the area.

    GetUserSectionsAsync(IUser, CancellationToken)

    Asynchronously retrieves the sections in the area that are visible to the specified user.

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

    The IUser for which to retrieve the visible sections.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task<IEnumerable<Section>>

    An enumerable of the visible sections.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when user is null.

    Init(AreaData)

    Initializes the area with the specified data.

    Declaration
    public void Init(AreaData areaData)
    Parameters
    Type Name Description
    AreaData areaData

    The AreaData used to initialize the area.

    InitAsync(string, CancellationToken)

    Initializes the area asynchronously with the specified name.

    Declaration
    public Task InitAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name

    The name of the area.

    CancellationToken cancellationToken
    Returns
    Type Description
    Task
    Exceptions
    Type Condition
    ArgumentException

    Thrown when name is null or empty.

    InvalidOperationException

    Thrown when no area with the specified name is found.

    IsVisible(PermissionSet)

    Determines whether the area is visible to a user with the specified permission set.

    Declaration
    public bool IsVisible(PermissionSet permissionSet)
    Parameters
    Type Name Description
    PermissionSet permissionSet

    The PermissionSet of the user.

    Returns
    Type Description
    bool

    True if the area is visible; false otherwise.

    Extension Methods

    StructureMapperExtension.ToAreaInfo(Area)
    In this article
    Back to top Generated by DocFX