ApplicationUserStoreTUserGetRolesAsync Method |
Gets a list of role names the specified user belongs to.
Namespace: Kentico.MembershipAssembly: Kentico.Membership (in Kentico.Membership.dll) Version: 13.0.131
Syntax public Task<IList<string>> GetRolesAsync(
TUser user,
CancellationToken cancellationToken
)
Parameters
- user
- Type: TUser
The user whose role names to retrieve. - cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Return Value
Type:
TaskIListString
The
TaskTResult that represents the asynchronous operation, containing a list of role names.
Implements
IUserRoleStore.GetRolesAsync(UTP, CancellationToken)Exceptions Exception | Condition |
---|
ArgumentNullException | user is null. |
See Also