RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> Klasa

Definicja

Tworzy nowe wystąpienie magazynu trwałości dla ról.

generic <typename TRole, typename TContext, typename TKey, typename TUserRole, typename TRoleClaim>
 where TRole : IdentityRole<TKey, TUserRole, TRoleClaim> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey> where TRoleClaim : IdentityRoleClaim<TKey>public ref class RoleStore abstract : IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
generic <typename TRole, typename TContext, typename TKey, typename TUserRole, typename TRoleClaim>
 where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey>gcnew() where TRoleClaim : IdentityRoleClaim<TKey>gcnew()public ref class RoleStore : IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
public abstract class RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> : IDisposable, Microsoft.AspNetCore.Identity.IQueryableRoleStore<TRole>, Microsoft.AspNetCore.Identity.IRoleClaimStore<TRole>, Microsoft.AspNetCore.Identity.IRoleStore<TRole> where TRole : IdentityRole<TKey,TUserRole,TRoleClaim> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey> where TRoleClaim : IdentityRoleClaim<TKey>
public class RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim> : IDisposable, Microsoft.AspNetCore.Identity.IQueryableRoleStore<TRole>, Microsoft.AspNetCore.Identity.IRoleClaimStore<TRole>, Microsoft.AspNetCore.Identity.IRoleStore<TRole> where TRole : IdentityRole<TKey> where TContext : DbContext where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey>, new() where TRoleClaim : IdentityRoleClaim<TKey>, new()
type RoleStore<'Role, 'Context, 'Key, 'UserRole, 'RoleClaim (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim> and 'Context :> DbContext and 'Key :> IEquatable<'Key> and 'UserRole :> IdentityUserRole<'Key> and 'RoleClaim :> IdentityRoleClaim<'Key>)> = class
    interface IQueryableRoleStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
    interface IRoleStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
    interface IDisposable
    interface IRoleClaimStore<'Role (requires 'Role :> IdentityRole<'Key, 'UserRole, 'RoleClaim>)>
type RoleStore<'Role, 'Context, 'Key, 'UserRole, 'RoleClaim (requires 'Role :> IdentityRole<'Key> and 'Context :> DbContext and 'Key :> IEquatable<'Key> and 'UserRole :> IdentityUserRole<'Key> and 'UserRole : (new : unit -> 'UserRole) and 'RoleClaim :> IdentityRoleClaim<'Key> and 'RoleClaim : (new : unit -> 'RoleClaim))> = class
    interface IQueryableRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IRoleStore<'Role (requires 'Role :> IdentityRole<'Key>)>
    interface IDisposable
    interface IRoleClaimStore<'Role (requires 'Role :> IdentityRole<'Key>)>
Public MustInherit Class RoleStore(Of TRole, TContext, TKey, TUserRole, TRoleClaim)
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)
Public Class RoleStore(Of TRole, TContext, TKey, TUserRole, TRoleClaim)
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)

Parametry typu

TRole

Typ klasy reprezentującej rolę.

TContext

Typ klasy kontekstu danych używanej do uzyskiwania dostępu do magazynu.

TKey

Typ klucza podstawowego dla roli.

TUserRole

Typ klasy reprezentującej rolę użytkownika.

TRoleClaim

Typ klasy reprezentującej oświadczenie roli.

Dziedziczenie
RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>
Pochodne
Implementuje

Konstruktory

RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>(TContext, IdentityErrorDescriber)

Tworzy nowe wystąpienie klasy RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.

Właściwości

AutoSaveChanges

Pobiera lub ustawia flagę wskazującą, czy zmiany powinny być utrwalane po wywołaniu metody CreateAsync, UpdateAsync i DeleteAsync.

Context

Pobiera kontekst bazy danych dla tego magazynu.

ErrorDescriber

Pobiera lub ustawia wartość IdentityErrorDescriber dla dowolnego błędu, który wystąpił podczas bieżącej operacji.

Roles

Właściwość nawigacji dla ról, które zawiera magazyn.

Metody

AddClaimAsync(TRole, Claim, CancellationToken)

Dodaje daną claim wartość do określonego roleelementu .

ConvertIdFromString(String)

Konwertuje podany id obiekt na silnie typizowanego obiektu klucza.

ConvertIdToString(TKey)

Konwertuje podaną id wartość na jej reprezentację ciągu.

CreateAsync(TRole, CancellationToken)

Tworzy nową rolę w magazynie jako operację asynchroniczną.

CreateRoleClaim(TRole, Claim)

Tworzy jednostkę reprezentującą oświadczenie roli.

DeleteAsync(TRole, CancellationToken)

Usuwa rolę z magazynu jako operację asynchroniczną.

Dispose()

Usuwanie sklepów

FindByIdAsync(String, CancellationToken)

Znajduje rolę, która ma określony identyfikator jako operację asynchroniczną.

FindByNameAsync(String, CancellationToken)

Znajduje rolę, która ma określoną znormalizowaną nazwę jako operację asynchroniczną.

GetClaimsAsync(TRole, CancellationToken)

Pobierz oświadczenia skojarzone z określoną role operacją asynchroniczną.

GetNormalizedRoleNameAsync(TRole, CancellationToken)

Pobierz znormalizowaną nazwę roli jako operację asynchroniczną.

GetRoleIdAsync(TRole, CancellationToken)

Pobiera identyfikator roli z magazynu jako operację asynchroniczną.

GetRoleNameAsync(TRole, CancellationToken)

Pobiera nazwę roli z magazynu jako operację asynchroniczną.

RemoveClaimAsync(TRole, Claim, CancellationToken)

Usuwa dane claim z określonego roleelementu .

SaveChanges(CancellationToken)

Zapisuje bieżący sklep.

SetNormalizedRoleNameAsync(TRole, String, CancellationToken)

Ustaw znormalizowaną nazwę roli jako operację asynchroniczną.

SetRoleNameAsync(TRole, String, CancellationToken)

Ustawia nazwę roli w magazynie jako operację asynchroniczną.

ThrowIfDisposed()

Zgłasza błąd, jeśli ta klasa została usunięta.

UpdateAsync(TRole, CancellationToken)

Aktualizacje rolę w magazynie jako operację asynchroniczną.

Dotyczy