Share via


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.GetRoleNameAsync Method

Definition

Gets the name of a role from the store as an asynchronous operation.

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)

Parameters

role
TRole

The role whose name should be returned.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

A Task<TResult> that contains the name of the role.

Implements

Applies to