UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.RemoveFromRoleAsync 方法

定义

从指定的 user中移除给定normalizedRoleName的 。

public virtual System.Threading.Tasks.Task RemoveFromRoleAsync (TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task RemoveFromRoleAsync (TUser user, string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
abstract member RemoveFromRoleAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.RemoveFromRoleAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.RemoveFromRoleAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function RemoveFromRoleAsync (user As TUser, normalizedRoleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overrides Function RemoveFromRoleAsync (user As TUser, normalizedRoleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task

参数

user
TUser

要从中删除角色的用户。

normalizedRoleName
String

要删除的角色。

cancellationToken
CancellationToken

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

返回

表示异步操作的 Task

实现

适用于