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<System::String ^> ^> ^ GetRolesAsync(TUser user, System::Threading::CancellationToken cancellationToken);
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>>
Public Function GetRolesAsync (user As TUser, cancellationToken As CancellationToken) As Task(Of IList(Of String))

Parameters

user
TUser

The user whose role names to retrieve.

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