Delen via


IUserRoleStore<TUser>.GetUsersInRoleAsync Method

Definition

Returns a list of Users who are members of the named role.

public:
 System::Threading::Tasks::Task<System::Collections::Generic::IList<TUser> ^> ^ GetUsersInRoleAsync(System::String ^ roleName, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<System.Collections.Generic.IList<TUser>> GetUsersInRoleAsync (string roleName, System.Threading.CancellationToken cancellationToken);
abstract member GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
Public Function GetUsersInRoleAsync (roleName As String, cancellationToken As CancellationToken) As Task(Of IList(Of TUser))

Parameters

roleName
String

The name of the role whose membership should be returned.

cancellationToken
CancellationToken

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

Returns

Task<IList<TUser>>

The Task that represents the asynchronous operation, containing a list of users who are in the named role.

Applies to