DataWeb
Search Results for

    Show / Hide Table of Contents

    Interface IPermissionSetStore

    Defines a store for retrieving permission set data.

    Namespace: DataWeb.Authorization
    Assembly: DataWeb.Core.dll
    Syntax
    public interface IPermissionSetStore
    Remarks

    This interface provides data access layer functionality for permission sets. Permission sets define the collection of permissions assigned to users or roles. Implementations may support in-memory caching for frequently accessed permission sets to improve performance.

    Properties

    Name

    Gets the name of the permission set store.

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

    Methods

    GetPermissionSetAsync(PermissionSetFilter, CancellationToken)

    Asynchronously retrieves a single permission set based on the provided filter.

    Declaration
    Task<PermissionSetData> GetPermissionSetAsync(PermissionSetFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    PermissionSetFilter filter

    A PermissionSetFilter object used to filter the permission sets.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<PermissionSetData>

    A task that represents the asynchronous operation. The task result is a PermissionSetData object matching the filter, or null if no match is found.

    Remarks

    This method returns at most one result. If multiple permission sets match the filter, the implementation should return the first match or throw an exception if multiple matches are ambiguous.

    GetPermissionSetCachedAsync(string, CancellationToken)

    Asynchronously retrieves a permission set from the cache by name.

    Declaration
    Task<PermissionSetData> GetPermissionSetCachedAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name

    The name of the permission set to retrieve.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<PermissionSetData>

    A task that represents the asynchronous operation. The task result is a cached PermissionSetData object, or null if not found in cache.

    Remarks

    This method retrieves permission sets from a fast-access cache (typically in-memory). It is optimized for frequently accessed permission sets and avoids hitting the underlying data store.

    If the permission set is not in the cache, this method returns null. To retrieve from the data store with automatic caching, use GetPermissionSetAsync(PermissionSetFilter, CancellationToken) instead.

    GetPermissionSetsAsync(PermissionSetFilter, CancellationToken)

    Asynchronously retrieves a collection of permission sets based on the provided filter.

    Declaration
    Task<IEnumerable<PermissionSetData>> GetPermissionSetsAsync(PermissionSetFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    PermissionSetFilter filter

    A PermissionSetFilter object used to filter the permission sets.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<IEnumerable<PermissionSetData>>

    A task that represents the asynchronous operation. The task result contains an enumerable collection of matching PermissionSetData objects, or an empty collection if no permission sets match the filter criteria.

    In this article
    Back to top Generated by DocFX