共用方式為


IRoleStore<TRole>.FindByNameAsync(String, CancellationToken) 方法

定義

尋找具有指定正規化名稱的角色做為非同步作業。

public:
 System::Threading::Tasks::Task<TRole> ^ FindByNameAsync(System::String ^ normalizedRoleName, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TRole> FindByNameAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task<TRole?> FindByNameAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken);
abstract member FindByNameAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Role (requires 'Role : null)>
Public Function FindByNameAsync (normalizedRoleName As String, cancellationToken As CancellationToken) As Task(Of TRole)

參數

normalizedRoleName
String

要尋找的正規化角色名稱。

cancellationToken
CancellationToken

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

傳回

Task<TRole>

查詢 Task<TResult> 結果的 。

適用於