IUserPhoneNumberStore<TUser>.GetPhoneNumberAsync 方法

定义

获取指定 user的电话号码(如果有)。

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

参数

user
TUser

应检索其电话号码的用户。

cancellationToken
CancellationToken

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

返回

表示 Task 异步操作的 ,其中包含用户的电话号码(如果有)。

适用于