Compartir a través de


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindRoleAsync Método

Definición

Devuelve un rol con el nombre normalizado si existe.

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)

Parámetros

normalizedRoleName
String

Nombre del rol normalizado.

cancellationToken
CancellationToken

El objeto CancellationToken que se usa para propagar notificaciones de que se debe cancelar la operación.

Devoluciones

Task<TRole>

Rol si existe.

Se aplica a