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

定义

获取指定 user的用户标识符。

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

参数

user
TUser

应检索其标识符的用户。

cancellationToken
CancellationToken

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

返回

表示 Task 异步操作的 ,其中包含指定 user的标识符。

适用于