Udostępnij za pośrednictwem


AspNetRoleManager<TRole> Konstruktor

Definicja

Tworzy nowe wystąpienie klasy 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)

Parametry

store
IRoleStore<TRole>

Magazyn trwałości, nad którym będzie działać menedżer.

roleValidators
IEnumerable<IRoleValidator<TRole>>

Kolekcja modułów sprawdzania poprawności dla ról.

keyNormalizer
ILookupNormalizer

Normalizator używany podczas normalizacji nazw ról w kluczach.

errors
IdentityErrorDescriber

Używany IdentityErrorDescriber do obsługi komunikatów o błędach dostawcy.

logger
ILogger<RoleManager<TRole>>

Rejestrator używany do rejestrowania komunikatów, ostrzeżeń i błędów.

contextAccessor
IHttpContextAccessor

Akcesorium używane do uzyskiwania dostępu do metody HttpContext.

Dotyczy