共用方式為


RoleManager<TRole> 建構函式

定義

多載

RoleManager<TRole>(IRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, ILookupNormalizer, IdentityErrorDescriber, ILogger<RoleManager<TRole>>)

建構 RoleManager<TRole> 的新執行個體。

RoleManager<TRole>(IRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, ILookupNormalizer, IdentityErrorDescriber, ILogger<RoleManager<TRole>>, IHttpContextAccessor)

建構 RoleManager<TRole> 的新執行個體。

RoleManager<TRole>(IRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, ILookupNormalizer, IdentityErrorDescriber, ILogger<RoleManager<TRole>>)

來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs
來源:
RoleManager.cs

建構 RoleManager<TRole> 的新執行個體。

public:
 RoleManager(Microsoft::AspNetCore::Identity::IRoleStore<TRole> ^ store, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Identity::IRoleValidator<TRole> ^> ^ roleValidators, Microsoft::AspNetCore::Identity::ILookupNormalizer ^ keyNormalizer, Microsoft::AspNetCore::Identity::IdentityErrorDescriber ^ errors, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Identity::RoleManager<TRole> ^> ^ logger);
public RoleManager (Microsoft.AspNetCore.Identity.IRoleStore<TRole> store, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IRoleValidator<TRole>> roleValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.RoleManager<TRole>> logger);
new Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)> : Microsoft.AspNetCore.Identity.IRoleStore<'Role (requires 'Role : null)> * seq<Microsoft.AspNetCore.Identity.IRoleValidator<'Role>> * Microsoft.AspNetCore.Identity.ILookupNormalizer * Microsoft.AspNetCore.Identity.IdentityErrorDescriber * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.RoleManager<'Role>> -> Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)>
Public Sub New (store As IRoleStore(Of TRole), roleValidators As IEnumerable(Of IRoleValidator(Of TRole)), keyNormalizer As ILookupNormalizer, errors As IdentityErrorDescriber, logger As ILogger(Of RoleManager(Of TRole)))

參數

store
IRoleStore<TRole>

管理員將會運作的持續性存放區。

roleValidators
IEnumerable<IRoleValidator<TRole>>

角色的驗證程式集合。

keyNormalizer
ILookupNormalizer

將角色名稱正規化為索引鍵時要使用的正規化程式。

errors
IdentityErrorDescriber

IdentityErrorDescriber用來提供者錯誤訊息的 。

logger
ILogger<RoleManager<TRole>>

用來記錄訊息、警告和錯誤的記錄器。

適用於

RoleManager<TRole>(IRoleStore<TRole>, IEnumerable<IRoleValidator<TRole>>, ILookupNormalizer, IdentityErrorDescriber, ILogger<RoleManager<TRole>>, IHttpContextAccessor)

建構 RoleManager<TRole> 的新執行個體。

public:
 RoleManager(Microsoft::AspNetCore::Identity::IRoleStore<TRole> ^ store, System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Identity::IRoleValidator<TRole> ^> ^ roleValidators, Microsoft::AspNetCore::Identity::ILookupNormalizer ^ keyNormalizer, Microsoft::AspNetCore::Identity::IdentityErrorDescriber ^ errors, Microsoft::Extensions::Logging::ILogger<Microsoft::AspNetCore::Identity::RoleManager<TRole> ^> ^ logger, Microsoft::AspNetCore::Http::IHttpContextAccessor ^ contextAccessor);
public RoleManager (Microsoft.AspNetCore.Identity.IRoleStore<TRole> store, System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Identity.IRoleValidator<TRole>> roleValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.RoleManager<TRole>> logger, Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor);
new Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)> : Microsoft.AspNetCore.Identity.IRoleStore<'Role (requires 'Role : null)> * seq<Microsoft.AspNetCore.Identity.IRoleValidator<'Role>> * Microsoft.AspNetCore.Identity.ILookupNormalizer * Microsoft.AspNetCore.Identity.IdentityErrorDescriber * Microsoft.Extensions.Logging.ILogger<Microsoft.AspNetCore.Identity.RoleManager<'Role>> * Microsoft.AspNetCore.Http.IHttpContextAccessor -> Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)>
Public Sub New (store As IRoleStore(Of TRole), roleValidators As IEnumerable(Of IRoleValidator(Of TRole)), keyNormalizer As ILookupNormalizer, errors As IdentityErrorDescriber, logger As ILogger(Of RoleManager(Of TRole)), contextAccessor As IHttpContextAccessor)

參數

store
IRoleStore<TRole>

管理員將會運作的持續性存放區。

roleValidators
IEnumerable<IRoleValidator<TRole>>

角色的驗證程式集合。

keyNormalizer
ILookupNormalizer

將角色名稱正規化為索引鍵時要使用的正規化程式。

errors
IdentityErrorDescriber

IdentityErrorDescriber用來提供者錯誤訊息的 。

logger
ILogger<RoleManager<TRole>>

用來記錄訊息、警告和錯誤的記錄器。

contextAccessor
IHttpContextAccessor

用來存取 的 HttpContext 存取子。

適用於