Compartir a través de


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.GetRoleNameAsync Método

Definición

Obtiene el nombre de un rol del almacén como una operación asincrónica.

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

Parámetros

role
TRole

Rol cuyo nombre se debe devolver.

cancellationToken
CancellationToken

El objeto CancellationToken que se usa para propagar notificaciones de que se debe cancelar la operación.

Devoluciones

Un Task<TResult> que contiene el nombre del rol.

Implementaciones

Se aplica a