Show / Hide Table of Contents

Interface IRoleStore<TRole>

Provides an abstraction for a storage and management of roles.

Inherited Members
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.CreateAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.UpdateAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.DeleteAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.GetRoleIdAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.GetRoleNameAsync(TRole, System.Threading.CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.SetRoleNameAsync(TRole, System.String, System.Threading.CancellationToken)
IRoleStore<TRole>.GetNormalizedRoleNameAsync(TRole, CancellationToken)
IRoleStore<TRole>.SetNormalizedRoleNameAsync(TRole, String, CancellationToken)
IRoleStore<TRole>.FindByIdAsync(String, CancellationToken)
Microsoft.AspNetCore.Identity.IRoleStore<TRole>.FindByNameAsync(System.String, System.Threading.CancellationToken)
System.IDisposable.Dispose()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IRoleStore<TRole> : IRoleStore<TRole>, IDisposable where TRole : class
Type Parameters
TRole

The type that represents a role.

Methods

GetAllAsync(RolesSearchQuery, CancellationToken)

Gets all roles for the specified tenant.

Declaration
Task<QueryResult<TRole>> GetAllAsync(RolesSearchQuery query, CancellationToken cancellationToken = default(CancellationToken))
Parameters
RolesSearchQuery query

The query describing filtering and sorting for the roles.

System.Threading.CancellationToken cancellationToken

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

Returns
System.Threading.Tasks.Task<QueryResult<TRole>>

A System.Threading.Tasks.Task that represents the QueryResult<T> of the asynchronous query.

GetUserRolesAsync(Guid, CancellationToken)

Retrieves the roles the specified userId is a member of.

Declaration
Task<List<TRole>> GetUserRolesAsync(Guid userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.Guid userId

The id of the user whose roles should be retrieved.

System.Threading.CancellationToken cancellationToken

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

Returns
System.Threading.Tasks.Task<List<TRole>>

A System.Threading.Tasks.Task<TResult> that contains the roles the user is a member of.

Back to top Generated by DocFX