RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.SetNormalizedRoleNameAsync 方法

定义

将角色的规范化名称设置为异步操作。

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

参数

role
TRole

应设置其规范化名称的角色。

normalizedName
String

要设置的规范化名称

cancellationToken
CancellationToken

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

返回

表示异步操作的 Task

实现

适用于