共用方式為


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 的名稱。

適用於