IUserRoleStore<TUser>.IsInRoleAsync(TUser, String, CancellationToken) IUserRoleStore<TUser>.IsInRoleAsync(TUser, String, CancellationToken) IUserRoleStore<TUser>.IsInRoleAsync(TUser, String, CancellationToken) 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>

Parameters

user
TUser TUser TUser

The user whose role membership should be checked.

roleName
String String String

The name of the role to be checked.

cancellationToken
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 flag indicating whether the specified user is a member of the named role.

Applies to