IUserStore<TUser>.GetUserNameAsync(TUser, CancellationToken) 方法

定义

获取指定 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)

参数

user
TUser

应检索其名称的用户。

cancellationToken
CancellationToken

CancellationToken,用于传播应取消操作的通知。

返回

表示 Task 异步操作的 ,其中包含指定 user的名称。

适用于