IUserStore<TUser>.FindByIdAsync(String, CancellationToken) Méthode

Définition

Recherche et retourne un utilisateur, le cas échéant, qui a le spécifié userId.

public:
 System::Threading::Tasks::Task<TUser> ^ FindByIdAsync(System::String ^ userId, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TUser> FindByIdAsync (string userId, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TUser?> FindByIdAsync (string userId, System.Threading.CancellationToken cancellationToken);
abstract member FindByIdAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Function FindByIdAsync (userId As String, cancellationToken As CancellationToken) As Task(Of TUser)

Paramètres

userId
String

ID utilisateur à rechercher.

cancellationToken
CancellationToken

CancellationToken utilisé pour propager les notifications indiquant que l’opération doit être annulée.

Retours

Task<TUser>

Task qui représente l’opération asynchrone, contenant l’utilisateur correspondant au spécifié userId s’il existe.

S’applique à