共用方式為


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.GetClaimsAsync 方法

定義

取得與指定 role 做為非同步作業之 相關聯的宣告。

public System.Threading.Tasks.Task<System.Collections.Generic.IList<System.Security.Claims.Claim>> GetClaimsAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IList<System.Security.Claims.Claim>> GetClaimsAsync (TRole role, System.Threading.CancellationToken cancellationToken = default);
abstract member GetClaimsAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<System.Security.Claims.Claim>>
override this.GetClaimsAsync : 'Role * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<System.Security.Claims.Claim>>
Public Function GetClaimsAsync (role As TRole, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of Claim))
Public Overridable Function GetClaimsAsync (role As TRole, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of Claim))

參數

role
TRole

應該擷取其宣告的角色。

cancellationToken
CancellationToken

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

傳回

Task<TResult> 其中包含授與角色的宣告。

實作

適用於