UserStoreBase<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.GetRolesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the roles the specified user
is a member of.
public abstract System.Threading.Tasks.Task<System.Collections.Generic.IList<string>> GetRolesAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRolesAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
Public MustOverride Function GetRolesAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of String))
Parameters
- user
- TUser
The user whose roles should be retrieved.
- cancellationToken
- CancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Returns
A Task<TResult> that contains the roles the user is a member of.
Implements
Applies to
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: