Share via


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindUserRoleAsync Metodo

Definizione

Restituisce un ruolo utente per userId e roleId se esistente.

protected:
 override System::Threading::Tasks::Task<TUserRole> ^ FindUserRoleAsync(TKey userId, TKey roleId, System::Threading::CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserRole> FindUserRoleAsync (TKey userId, TKey roleId, System.Threading.CancellationToken cancellationToken);
protected override System.Threading.Tasks.Task<TUserRole?> FindUserRoleAsync (TKey userId, TKey roleId, System.Threading.CancellationToken cancellationToken);
override this.FindUserRoleAsync : 'Key * 'Key * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'UserRole (requires 'UserRole :> Microsoft.AspNetCore.Identity.IdentityUserRole<'Key> and 'UserRole : (new : unit -> 'UserRole))>
Protected Overrides Function FindUserRoleAsync (userId As TKey, roleId As TKey, cancellationToken As CancellationToken) As Task(Of TUserRole)

Parametri

userId
TKey

ID dell'utente.

roleId
TKey

ID del ruolo.

cancellationToken
CancellationToken

Oggetto CancellationToken usato per propagare le notifiche di richiesta di annullamento dell'operazione.

Restituisce

Task<TUserRole>

Ruolo utente se presente.

Si applica a