共用方式為


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.GetUsersInRoleAsync 方法

定義

擷取指定角色中的所有使用者。

public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<TUser>> GetUsersInRoleAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task<System.Collections.Generic.IList<TUser>> GetUsersInRoleAsync (string normalizedRoleName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
override this.GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
override this.GetUsersInRoleAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<'User>>
Public Overridable Function GetUsersInRoleAsync (normalizedRoleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of TUser))
Public Overrides Function GetUsersInRoleAsync (normalizedRoleName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of TUser))

參數

normalizedRoleName
String

應該擷取其使用者的角色。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

Task<IList<TUser>>

Task包含位於指定角色中的使用者清單,如果有的話。

實作

適用於