Share via


IUserRoleStore<TUser>.IsInRoleAsync Method

Definition

Returns a flag indicating whether the specified user is a member of the given named role.

public:
 System::Threading::Tasks::Task<bool> ^ IsInRoleAsync(TUser user, System::String ^ roleName, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<bool> IsInRoleAsync (TUser user, string roleName, System.Threading.CancellationToken cancellationToken);
abstract member IsInRoleAsync : 'User * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function IsInRoleAsync (user As TUser, roleName As String, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

user
TUser

The user whose role membership should be checked.

roleName
String

The name of the role to be checked.

cancellationToken
CancellationToken

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

Returns

The Task that represents the asynchronous operation, containing a flag indicating whether the specified user is a member of the named role.

Applies to