Share via


AspNetRoleManager<TRole> Class

Definition

Provides the APIs for managing roles in a persistence store.

generic <typename TRole>
 where TRole : classpublic ref class AspNetRoleManager : Microsoft::AspNetCore::Identity::RoleManager<TRole>, IDisposable
public class AspNetRoleManager<TRole> : Microsoft.AspNetCore.Identity.RoleManager<TRole>, IDisposable where TRole : class
type AspNetRoleManager<'Role (requires 'Role : null)> = class
    inherit RoleManager<'Role (requires 'Role : null)>
    interface IDisposable
Public Class AspNetRoleManager(Of TRole)
Inherits RoleManager(Of TRole)
Implements IDisposable

Type Parameters

TRole

The type encapsulating a role.

Inheritance
AspNetRoleManager<TRole>
Implements

Constructors

AspNetRoleManager<TRole>(IRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, ILookupNormalizer, IdentityErrorDescriber, ILogger<RoleManager<TRole>>, IHttpContextAccessor)

Constructs a new instance of RoleManager<TRole>.

Properties

CancellationToken

The cancellation token associated with the current HttpContext.RequestAborted or CancellationToken.None if unavailable.

ErrorDescriber

Gets the IdentityErrorDescriber used to provider error messages.

(Inherited from RoleManager<TRole>)
KeyNormalizer

Gets the normalizer to use when normalizing role names to keys.

(Inherited from RoleManager<TRole>)
Logger

Gets the ILogger used to log messages from the manager.

(Inherited from RoleManager<TRole>)
Roles

Gets an IQueryable collection of Roles if the persistence store is an IQueryableRoleStore<TRole>, otherwise throws a NotSupportedException.

(Inherited from RoleManager<TRole>)
RoleValidators

Gets a list of validators for roles to call before persistence.

(Inherited from RoleManager<TRole>)
Store

Gets the persistence store this instance operates over.

(Inherited from RoleManager<TRole>)
SupportsQueryableRoles

Gets a flag indicating whether the underlying persistence store supports returning an IQueryable collection of roles.

(Inherited from RoleManager<TRole>)
SupportsRoleClaims

Gets a flag indicating whether the underlying persistence store supports Claims for roles.

(Inherited from RoleManager<TRole>)

Methods

AddClaimAsync(TRole, Claim)

Adds a claim to a role.

(Inherited from RoleManager<TRole>)
CreateAsync(TRole)

Creates the specified role in the persistence store.

(Inherited from RoleManager<TRole>)
DeleteAsync(TRole)

Deletes the specified role.

(Inherited from RoleManager<TRole>)
Dispose()

Releases all resources used by the role manager.

(Inherited from RoleManager<TRole>)
Dispose(Boolean)

Releases the unmanaged resources used by the role manager and optionally releases the managed resources.

(Inherited from RoleManager<TRole>)
FindByIdAsync(String)

Finds the role associated with the specified roleId if any.

(Inherited from RoleManager<TRole>)
FindByNameAsync(String)

Finds the role associated with the specified roleName if any.

(Inherited from RoleManager<TRole>)
GetClaimsAsync(TRole)

Gets a list of claims associated with the specified role.

(Inherited from RoleManager<TRole>)
GetRoleIdAsync(TRole)

Gets the ID of the specified role.

(Inherited from RoleManager<TRole>)
GetRoleNameAsync(TRole)

Gets the name of the specified role.

(Inherited from RoleManager<TRole>)
NormalizeKey(String)

Gets a normalized representation of the specified key.

(Inherited from RoleManager<TRole>)
RemoveClaimAsync(TRole, Claim)

Removes a claim from a role.

(Inherited from RoleManager<TRole>)
RoleExistsAsync(String)

Gets a flag indicating whether the specified roleName exists.

(Inherited from RoleManager<TRole>)
SetRoleNameAsync(TRole, String)

Sets the name of the specified role.

(Inherited from RoleManager<TRole>)
ThrowIfDisposed()

Throws if this class has been disposed.

(Inherited from RoleManager<TRole>)
UpdateAsync(TRole)

Updates the specified role.

(Inherited from RoleManager<TRole>)
UpdateNormalizedRoleNameAsync(TRole)

Updates the normalized name for the specified role.

(Inherited from RoleManager<TRole>)
UpdateRoleAsync(TRole)

Called to update the role after validating and updating the normalized role name.

(Inherited from RoleManager<TRole>)
ValidateRoleAsync(TRole)

Should return Success if validation is successful. This is called before saving the role via Create or Update.

(Inherited from RoleManager<TRole>)

Applies to