RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.SetRoleNameAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將存放區中的角色名稱設定為非同步作業。
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。