UserClaimsPrincipalFactory<TUser,TRole> 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UserClaimsPrincipalFactory<TUser,TRole>(UserManager<TUser>, RoleManager<TRole>, IOptions<IdentityOptions>)
初始化 UserClaimsPrincipalFactory<TUser,TRole> 類別的新執行個體。
public:
UserClaimsPrincipalFactory(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ userManager, Microsoft::AspNetCore::Identity::RoleManager<TRole> ^ roleManager, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Builder::IdentityOptions ^> ^ optionsAccessor);
public UserClaimsPrincipalFactory (Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Identity.RoleManager<TRole> roleManager, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.IdentityOptions> optionsAccessor);
new Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<'User, 'Role (requires 'User : null and 'Role : null)> : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)> * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Builder.IdentityOptions> -> Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<'User, 'Role (requires 'User : null and 'Role : null)>
Public Sub New (userManager As UserManager(Of TUser), roleManager As RoleManager(Of TRole), optionsAccessor As IOptions(Of IdentityOptions))
參數
- userManager
- UserManager<TUser>
要 UserManager<TUser> 從中擷取使用者資訊的 。
- roleManager
- RoleManager<TRole>
要 RoleManager<TRole> 從中擷取使用者角色的 。
- optionsAccessor
- IOptions<IdentityOptions>
已設定的 IdentityOptions。
適用於
UserClaimsPrincipalFactory<TUser,TRole>(UserManager<TUser>, RoleManager<TRole>, IOptions<IdentityOptions>)
初始化 UserClaimsPrincipalFactory<TUser,TRole> 類別的新執行個體。
public:
UserClaimsPrincipalFactory(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ userManager, Microsoft::AspNetCore::Identity::RoleManager<TRole> ^ roleManager, Microsoft::Extensions::Options::IOptions<Microsoft::AspNetCore::Identity::IdentityOptions ^> ^ options);
public UserClaimsPrincipalFactory (Microsoft.AspNetCore.Identity.UserManager<TUser> userManager, Microsoft.AspNetCore.Identity.RoleManager<TRole> roleManager, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> options);
new Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<'User, 'Role (requires 'User : null and 'Role : null)> : Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * Microsoft.AspNetCore.Identity.RoleManager<'Role (requires 'Role : null)> * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.Identity.IdentityOptions> -> Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<'User, 'Role (requires 'User : null and 'Role : null)>
Public Sub New (userManager As UserManager(Of TUser), roleManager As RoleManager(Of TRole), options As IOptions(Of IdentityOptions))
參數
- userManager
- UserManager<TUser>
要 UserManager<TUser> 從中擷取使用者資訊的 。
- roleManager
- RoleManager<TRole>
要 RoleManager<TRole> 從中擷取使用者角色的 。
- options
- IOptions<IdentityOptions>
已設定的 IdentityOptions。