Search Results for

    Show / Hide Table of Contents
    View Source

    Class MemberRoleStore

    A custom user store that uses Umbraco member data

    Inheritance
    object
    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class MemberRoleStore

    Constructors

    View Source

    MemberRoleStore(IMemberGroupService, IdentityErrorDescriber)

    Declaration
    public MemberRoleStore(IMemberGroupService memberGroupService, IdentityErrorDescriber errorDescriber)
    Parameters
    Type Name Description
    IMemberGroupService memberGroupService
    IdentityErrorDescriber errorDescriber

    Properties

    View Source

    ErrorDescriber

    Gets or sets the Microsoft.AspNetCore.Identity.IdentityErrorDescriber for any error that occurred with the current operation.

    Declaration
    public IdentityErrorDescriber ErrorDescriber { get; set; }
    Property Value
    Type Description
    IdentityErrorDescriber
    View Source

    Roles

    Returns an System.Linq.IQueryable<T> collection of roles.

    Declaration
    public IQueryable<UmbracoIdentityRole> Roles { get; }
    Property Value
    Type Description
    IQueryable<UmbracoIdentityRole>

    An System.Linq.IQueryable<T> collection of roles.

    Methods

    View Source

    CreateAsync(UmbracoIdentityRole, CancellationToken)

    Creates a new role in a store as an asynchronous operation.

    Declaration
    public Task<IdentityResult> CreateAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role to create in the store.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<IdentityResult>

    A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.

    View Source

    DeleteAsync(UmbracoIdentityRole, CancellationToken)

    Deletes a role from the store as an asynchronous operation.

    Declaration
    public Task<IdentityResult> DeleteAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role to delete from the store.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<IdentityResult>

    A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.

    View Source

    Dispose()

    Dispose the store

    Declaration
    public void Dispose()
    View Source

    FindByIdAsync(string, CancellationToken)

    Finds the role who has the specified ID as an asynchronous operation.

    Declaration
    public Task<UmbracoIdentityRole?> FindByIdAsync(string roleId, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string roleId

    The role ID to look for.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<UmbracoIdentityRole>

    A System.Threading.Tasks.Task<TResult> that result of the look up.

    View Source

    FindByNameAsync(string, CancellationToken)

    Finds the role who has the specified normalized name as an asynchronous operation.

    Declaration
    public Task<UmbracoIdentityRole?> FindByNameAsync(string name, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    string name
    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<UmbracoIdentityRole>

    A System.Threading.Tasks.Task<TResult> that result of the look up.

    View Source

    GetNormalizedRoleNameAsync(UmbracoIdentityRole, CancellationToken)

    Get a role's normalized name as an asynchronous operation.

    Declaration
    public Task<string?> GetNormalizedRoleNameAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role whose normalized name should be retrieved.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<string>

    A System.Threading.Tasks.Task<TResult> that contains the name of the role.

    View Source

    GetRoleIdAsync(UmbracoIdentityRole, CancellationToken)

    Gets the ID for a role from the store as an asynchronous operation.

    Declaration
    public Task<string> GetRoleIdAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role whose ID should be returned.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<string>

    A System.Threading.Tasks.Task<TResult> that contains the ID of the role.

    View Source

    GetRoleNameAsync(UmbracoIdentityRole, CancellationToken)

    Gets the name of a role from the store as an asynchronous operation.

    Declaration
    public Task<string?> GetRoleNameAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role whose name should be returned.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<string>

    A System.Threading.Tasks.Task<TResult> that contains the name of the role.

    View Source

    SetNormalizedRoleNameAsync(UmbracoIdentityRole, string?, CancellationToken)

    Set a role's normalized name as an asynchronous operation.

    Declaration
    public Task SetNormalizedRoleNameAsync(UmbracoIdentityRole role, string? normalizedName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role whose normalized name should be set.

    string normalizedName

    The normalized name to set

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task

    The System.Threading.Tasks.Task that represents the asynchronous operation.

    View Source

    SetRoleNameAsync(UmbracoIdentityRole, string?, CancellationToken)

    Sets the name of a role in the store as an asynchronous operation.

    Declaration
    public Task SetRoleNameAsync(UmbracoIdentityRole role, string? roleName, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role whose name should be set.

    string roleName

    The name of the role.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task

    The System.Threading.Tasks.Task that represents the asynchronous operation.

    View Source

    ThrowIfDisposed()

    Throws if this class has been disposed.

    Declaration
    protected void ThrowIfDisposed()
    View Source

    UpdateAsync(UmbracoIdentityRole, CancellationToken)

    Updates a role in a store as an asynchronous operation.

    Declaration
    public Task<IdentityResult> UpdateAsync(UmbracoIdentityRole role, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    UmbracoIdentityRole role

    The role to update in the store.

    CancellationToken cancellationToken

    The System.Threading.CancellationToken used to propagate notifications that the operation should be canceled.

    Returns
    Type Description
    Task<IdentityResult>

    A System.Threading.Tasks.Task<TResult> that represents the Microsoft.AspNetCore.Identity.IdentityResult of the asynchronous query.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX