共用方式為


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

定義

如果角色存在,則傳回具有正規化名稱的角色。

protected:
 override System::Threading::Tasks::Task<TRole> ^ FindRoleAsync(System::String ^ normalizedRoleName, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TRole> FindRoleAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TRole?> FindRoleAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken);
override this.FindRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role :> Microsoft.AspNetCore.Identity.IdentityRole<'Key>)>
Protected Overrides Function FindRoleAsync (normalizedRoleName As String, cancellationToken As CancellationToken) As Task(Of TRole)

參數

normalizedRoleName
String

正規化角色名稱。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

Task<TRole>

如果角色存在,則為 。

適用於