AspNetRoleManager<TRole> 构造函数

定义

构造 RoleManager<TRole> 的新实例。

public:
 AspNetRoleManager(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 AspNetRoleManager (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.AspNetRoleManager<'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.AspNetRoleManager<'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访问器。

适用于