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

Definition

Finds the role who has the specified normalized name as an asynchronous operation.

C#
public virtual System.Threading.Tasks.Task<TRole> FindByNameAsync (string normalizedName, System.Threading.CancellationToken cancellationToken = default);
C#
public virtual System.Threading.Tasks.Task<TRole?> FindByNameAsync (string normalizedName, System.Threading.CancellationToken cancellationToken = default);

Parameters

normalizedName
String

The normalized role name to look for.

cancellationToken
CancellationToken

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

Returns

Task<TRole>

A Task<TResult> that result of the look up.

Implements

Applies to

Produkt Versiounen
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0