UserStoreBase<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.FindUserRoleAsync Yöntem

Tanım

varsa userId ve roleId için bir kullanıcı rolü döndürür.

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

Parametreler

userId
TKey

Kullanıcının kimliği.

roleId
TKey

Rolün kimliği.

cancellationToken
CancellationToken

İşlemin CancellationToken iptal edilmesi gerektiğine ilişkin bildirimleri yaymak için kullanılır.

Döndürülenler

Task<TUserRole>

Varsa kullanıcı rolü.

Şunlara uygulanır