IUserRoleStore<TUser>.GetRolesAsync(TUser, CancellationToken) IUserRoleStore<TUser>.GetRolesAsync(TUser, CancellationToken) Method

Definition

Gets a list of role names the specified user belongs to.

public System.Threading.Tasks.Task<System.Collections.Generic.IList<string>> GetRolesAsync (TUser user, System.Threading.CancellationToken cancellationToken);
abstract member GetRolesAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>

Parameters

user
TUser TUser

The user whose role names to retrieve.

cancellationToken
CancellationToken CancellationToken

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

Returns

The Task that represents the asynchronous operation, containing a list of role names.

Applies to