UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.FindUserAsync(TKey, CancellationToken) 方法

定義

傳回具有相符 userId 的使用者(如果有的話)。

protected:
 abstract System::Threading::Tasks::Task<TUser> ^ FindUserAsync(TKey userId, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task<TUser> FindUserAsync (TKey userId, System.Threading.CancellationToken cancellationToken);
abstract member FindUserAsync : 'Key * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User :> Microsoft.AspNetCore.Identity.IdentityUser<'Key>)>
Protected MustOverride Function FindUserAsync (userId As TKey, cancellationToken As CancellationToken) As Task(Of TUser)

參數

userId
TKey

使用者的識別碼。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

Task<TUser>

如果存在,則為使用者。

適用於