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

定义

将存储区中的角色名称设置为异步操作。

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

参数

role
TRole

应设置其名称的角色。

roleName
String

角色的名称。

cancellationToken
CancellationToken

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

返回

表示异步操作的 Task

实现

适用于