共用方式為


IUserStore<TUser>.SetUserNameAsync 方法

定義

為指定的 user 設定指定的 userName

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

參數

user
TUser

應該設定其名稱的使用者。

userName
String

要設定的使用者名稱。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

表示非同步作業的 Task

適用於