RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim> 類別

定義

為角色建立持續性存放區的新實例。

generic <typename TRole, typename TKey, typename TUserRole, typename TRoleClaim>
 where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey>gcnew() where TRoleClaim : IdentityRoleClaim<TKey>gcnew()public ref class RoleStoreBase abstract : IDisposable, Microsoft::AspNetCore::Identity::IQueryableRoleStore<TRole>, Microsoft::AspNetCore::Identity::IRoleClaimStore<TRole>, Microsoft::AspNetCore::Identity::IRoleStore<TRole>
public abstract class RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim> : IDisposable, Microsoft.AspNetCore.Identity.IQueryableRoleStore<TRole>, Microsoft.AspNetCore.Identity.IRoleClaimStore<TRole>, Microsoft.AspNetCore.Identity.IRoleStore<TRole> where TRole : IdentityRole<TKey> where TKey : IEquatable<TKey> where TUserRole : IdentityUserRole<TKey>, new() where TRoleClaim : IdentityRoleClaim<TKey>, new()
type RoleStoreBase<'Role, 'Key, 'UserRole, 'RoleClaim (requires 'Role :> IdentityRole<'Key> 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 RoleStoreBase(Of TRole, TKey, TUserRole, TRoleClaim)
Implements IDisposable, IQueryableRoleStore(Of TRole), IRoleClaimStore(Of TRole), IRoleStore(Of TRole)

類型參數

TRole

代表角色的類別類型。

TKey

角色的主鍵類型。

TUserRole

代表使用者角色的類別類型。

TRoleClaim

代表角色宣告的類別類型。

繼承
RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim>
實作

建構函式

RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim>(IdentityErrorDescriber)

建構 RoleStoreBase<TRole,TKey,TUserRole,TRoleClaim> 的新執行個體。

屬性

ErrorDescriber

取得或設定 IdentityErrorDescriber 目前作業發生之任何錯誤的 。

Roles

存放區包含之角色的導覽屬性。

方法

AddClaimAsync(TRole, Claim, CancellationToken)

claim 指定的 加入至指定的 role

ConvertIdFromString(String)

將提供的 id 轉換為強型別索引鍵物件。

ConvertIdToString(TKey)

將提供的 id 轉換為其字串表示。

CreateAsync(TRole, CancellationToken)

在存放區中建立新角色做為非同步作業。

CreateRoleClaim(TRole, Claim)

建立代表角色宣告的實體。

DeleteAsync(TRole, CancellationToken)

從存放區刪除角色做為非同步作業。

Dispose()

處置存放區

FindByIdAsync(String, CancellationToken)

尋找具有指定識別碼的角色做為非同步作業。

FindByNameAsync(String, CancellationToken)

尋找具有指定正規化名稱的角色做為非同步作業。

GetClaimsAsync(TRole, CancellationToken)

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

GetNormalizedRoleNameAsync(TRole, CancellationToken)

取得角色的正規化名稱作為非同步作業。

GetRoleIdAsync(TRole, CancellationToken)

從存放區取得角色的識別碼做為非同步作業。

GetRoleNameAsync(TRole, CancellationToken)

從存放區取得角色的名稱做為非同步作業。

RemoveClaimAsync(TRole, Claim, CancellationToken)

claim從指定的 移除指定的 role

SetNormalizedRoleNameAsync(TRole, String, CancellationToken)

將角色的正規化名稱設定為非同步作業。

SetRoleNameAsync(TRole, String, CancellationToken)

將存放區中的角色名稱設定為非同步作業。

ThrowIfDisposed()

如果已處置這個類別,則會擲回 。

UpdateAsync(TRole, CancellationToken)

更新存放區中的角色作為非同步作業。

適用於