RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim>.GetNormalizedRoleNameAsync 方法

定义

获取角色的规范化名称作为异步操作。

public virtual System.Threading.Tasks.Task<string> GetNormalizedRoleNameAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<string?> GetNormalizedRoleNameAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
abstract member GetNormalizedRoleNameAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetNormalizedRoleNameAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Overridable Function GetNormalizedRoleNameAsync (role As TRole, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

参数

role
TRole

应检索其规范化名称的角色。

cancellationToken
CancellationToken

CancellationToken,用于传播应取消操作的通知。

返回

包含角色名称的 Task<TResult>

实现

适用于