Sdílet prostřednictvím


RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.AddClaimAsync Metoda

Definice

Přidá danou claim hodnotu k zadanému 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

Parametry

role
TRole

Role, do které se má deklarace identity přidat.

claim
Claim

Deklarace identity, která se má přidat do role.

cancellationToken
CancellationToken

Slouží CancellationToken k šíření oznámení, že operace by měla být zrušena.

Návraty

Hodnota Task , která představuje asynchronní operaci.

Implementuje

Platí pro