RoleManager<TRole>.SetRoleNameAsync(TRole, String) 方法

定义

设置指定 role的名称。

public:
 virtual System::Threading::Tasks::Task<Microsoft::AspNetCore::Identity::IdentityResult ^> ^ SetRoleNameAsync(TRole role, System::String ^ name);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetRoleNameAsync (TRole role, string name);
public virtual System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult> SetRoleNameAsync (TRole role, string? name);
abstract member SetRoleNameAsync : 'Role * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
override this.SetRoleNameAsync : 'Role * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Identity.IdentityResult>
Public Overridable Function SetRoleNameAsync (role As TRole, name As String) As Task(Of IdentityResult)

参数

role
TRole

应设置其名称的角色。

name
String

要设置的名称。

返回

表示 Task 异步操作的 ,包含 IdentityResult 操作的 。

适用于