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> 结果。

适用于