共用方式為


IRoleStore<TRole>.GetRoleIdAsync(TRole, CancellationToken) 方法

定義

從存放區取得角色的識別碼做為非同步作業。

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

參數

role
TRole

應該傳回其識別碼的角色。

cancellationToken
CancellationToken

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

傳回

Task<TResult>,包含角色的識別碼。

適用於