共用方式為


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

定義

claim 指定的 加入至指定的 role

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

參數

role
TRole

要加入宣告的角色。

claim
Claim

要新增至角色的宣告。

cancellationToken
CancellationToken

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

傳回

表示非同步作業的 Task

實作

適用於