Share via


IUserStore<TUser>.GetUserNameAsync(TUser, CancellationToken) Method

Definition

Gets the user name for the specified user.

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

Parameters

user
TUser

The user whose name should be retrieved.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

The Task that represents the asynchronous operation, containing the name for the specified user.

Applies to