Ejemplo n.º 1
0
        public MajidRoleManager(
            MajidRoleStore <TRole, TUser> store,
            IEnumerable <IRoleValidator <TRole> > roleValidators,
            ILookupNormalizer keyNormalizer,
            IdentityErrorDescriber errors,
            ILogger <MajidRoleManager <TRole, TUser> > logger,
            IPermissionManager permissionManager,
            ICacheManager cacheManager,
            IUnitOfWorkManager unitOfWorkManager,
            IRoleManagementConfig roleManagementConfig)
            : base(
                store,
                roleValidators,
                keyNormalizer,
                errors,
                logger)
        {
            _permissionManager = permissionManager;
            _cacheManager      = cacheManager;
            _unitOfWorkManager = unitOfWorkManager;

            RoleManagementConfig   = roleManagementConfig;
            MajidStore             = store;
            MajidSession           = NullMajidSession.Instance;
            LocalizationManager    = NullLocalizationManager.Instance;
            LocalizationSourceName = MajidZeroConsts.LocalizationSourceName;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        protected MajidRoleManager(
            MajidRoleStore <TRole, TUser> store,
            IPermissionManager permissionManager,
            IRoleManagementConfig roleManagementConfig,
            ICacheManager cacheManager,
            IUnitOfWorkManager unitOfWorkManager)
            : base(store)
        {
            PermissionManager = permissionManager;
            CacheManager      = cacheManager;
            UnitOfWorkManager = unitOfWorkManager;

            RoleManagementConfig   = roleManagementConfig;
            MajidStore             = store;
            MajidSession           = NullMajidSession.Instance;
            LocalizationManager    = NullLocalizationManager.Instance;
            LocalizationSourceName = MajidZeroConsts.LocalizationSourceName;
        }