IUserStore<TUser>.FindByIdAsync(String, CancellationToken) Metodo

Definizione

Trova e restituisce un utente, se presente, che ha l'oggetto specificato 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)

Parametri

userId
String

ID utente da cercare.

cancellationToken
CancellationToken

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

Restituisce

Task<TUser>

Oggetto Task che rappresenta l'operazione asincrona contenente l'utente corrispondente all'oggetto specificato userId , se esistente.

Si applica a