public IndexModel(
     IUserDbContext userDbContext,
     IOptions <UserDbContextConfiguration> userDbContextConfiguration,
     IRoleDbContext roleDbContext = null)
     : base(userDbContext, userDbContextConfiguration, roleDbContext)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// 初始化类<see cref="RoleManager{TRole, TUserRole, TRoleClaim}"/>
 /// </summary>
 /// <param name="store">存储接口。</param>
 /// <param name="roleValidators">角色验证集合。</param>
 /// <param name="keyNormalizer">角色唯一键格式化接口。</param>
 /// <param name="errors">错误实例。</param>
 /// <param name="logger">日志接口。</param>
 /// <param name="cache">缓存接口。</param>
 protected RoleManager(IRoleStore <TRole> store, IEnumerable <IRoleValidator <TRole> > roleValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, ILogger <RoleManager <TRole> > logger,
                       IMemoryCache cache)
     : base(store, roleValidators, keyNormalizer, errors, logger)
 {
     _store    = store as IRoleStoreBase <TRole, TUserRole, TRoleClaim>;
     DbContext = store as IRoleDbContext <TRole, TUserRole, TRoleClaim>;
     Cache     = cache;
 }
 public SetPasswordModel(
     IPasswordHasher <ApplicationUser> passwordHasher,
     IUserDbContext userDbContext,
     IOptions <UserDbContextConfiguration> userDbContextConfiguration,
     IRoleDbContext roleDbContext = null)
     : base(userDbContext, userDbContextConfiguration, roleDbContext)
 {
     _passwordHasher = passwordHasher;
 }
 public EditUserPageModel(
     IUserDbContext userDbContext,
     IOptions <UserDbContextConfiguration> userDbContextConfiguration,
     IRoleDbContext roleDbContext)
 {
     _userDbContext = userDbContext;
     _roleDbContext = roleDbContext;
     EditorInfos    =
         userDbContextConfiguration?.Value?.AdminAccountEditor;
 }
Exemplo n.º 5
0
 public DeleteRoleModel(
     SignInManager <ApplicationUser> signInManager,
     IRoleDbContext roleDbContext,
     IUserDbContext userDbContext,
     IOptions <RoleDbContextConfiguration> roleDbContextConfiguration = null)
     : base(roleDbContext, roleDbContextConfiguration)
 {
     _signInManager = signInManager;
     _userDbContext = userDbContext;
 }
 public UserRolesModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IUserDbContext userDbContext,
     IOptions <UserDbContextConfiguration> userDbContextConfiguration,
     IRoleDbContext roleDbContext = null)
     : base(userDbContext, userDbContextConfiguration, roleDbContext)
 {
     _userManager   = userManager;
     _signInManager = signInManager;
 }
Exemplo n.º 7
0
        public IndexModel(
            UserManager <ApplicationUser> userManager,
            IUserDbContext userDbContext        = null,
            IRoleDbContext roleDbContext        = null,
            IResourceDbContext resourceDbContxt = null,
            IClientDbContext clientDbContext    = null)
        {
            _userManager = userManager;

            this.HasUserDb     = userDbContext != null;
            this.HasRoleDb     = roleDbContext != null;
            this.HasResourceDb = resourceDbContxt != null;
            this.HasClientDb   = clientDbContext != null;
        }
 public EditRolePageModel(
     IRoleDbContext roleDbContext,
     IOptions <RoleDbContextConfiguration> roleDbContextConfiguration)
 {
     _roleDbContext = roleDbContext;
 }
Exemplo n.º 9
0
 public RoleRepository(IRoleDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public IndexModel(IRoleDbContext roleDbContext)
 {
     _roleDb = roleDbContext;
 }
Exemplo n.º 11
0
 public IndexModel(
     IRoleDbContext roleDbContext,
     IOptions <RoleDbContextConfiguration> roleDbContextConfiguration = null)
     : base(roleDbContext, roleDbContextConfiguration)
 {
 }
Exemplo n.º 12
0
 public RoleStoreProxy(IRoleDbContext roleDbContext = null)
 {
     _roleDbContext = roleDbContext ?? new InMemoryRoleDb();
 }