Share via


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.GetRoleIdAsync Méthode

Définition

Obtient l’ID d’un rôle à partir du magasin en tant qu’opération asynchrone.

public System.Threading.Tasks.Task<string> GetRoleIdAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<string> GetRoleIdAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRoleIdAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
override this.GetRoleIdAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<string>
Public Function GetRoleIdAsync (role As TRole, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)
Public Overridable Function GetRoleIdAsync (role As TRole, Optional cancellationToken As CancellationToken = Nothing) As Task(Of String)

Paramètres

role
TRole

Rôle dont l’ID doit être retourné.

cancellationToken
CancellationToken

CancellationToken utilisé pour propager les notifications indiquant que l’opération doit être annulée.

Retours

Task<TResult> qui contient l’ID du rôle.

Implémente

S’applique à