Udostępnij za pośrednictwem


UserStoreBase<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindRoleAsync Metoda

Definicja

Zwróć rolę o znormalizowanej nazwie, jeśli istnieje.

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

Parametry

normalizedRoleName
String

Nazwa znormalizowanych ról.

cancellationToken
CancellationToken

Używane CancellationToken do propagowania powiadomień, które należy anulować operacji.

Zwraca

Task<TRole>

Rola, jeśli istnieje.

Dotyczy