Sdílet prostřednictvím


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

Definice

Pokud existuje, vraťte roli uživatele pro id uživatele a id role.

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)

Parametry

userId
TKey

ID uživatele.

roleId
TKey

ID role.

cancellationToken
CancellationToken

Slouží CancellationToken k šíření oznámení, že operace by měla být zrušena.

Návraty

Task<TUserRole>

Role uživatele, pokud existuje.

Platí pro