コード例 #1
0
        public AccountController(
            IUsersService usersService,
            ITokenStoreService tokenStoreService,
            ILoginService loginService,
            IAuthLevelService authLevelService,
            IPolicyService policyService,
            IRolesService rolesService,
            IUnitOfWork uow,
            IMapper mapper)
        {
            _usersService = usersService;
            _usersService.CheckArgumentIsNull(nameof(usersService));

            _tokenStoreService = tokenStoreService;
            _tokenStoreService.CheckArgumentIsNull(nameof(_tokenStoreService));

            _loginService = loginService;
            _loginService.CheckArgumentIsNull(nameof(_loginService));

            _authLevelService = authLevelService;
            _authLevelService.CheckArgumentIsNull(nameof(_authLevelService));

            _policyService = policyService;
            _policyService.CheckArgumentIsNull(nameof(_policyService));

            _roleService = rolesService;
            _roleService.CheckArgumentIsNull(nameof(_roleService));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
コード例 #2
0
        public UserManagerController(
            IMapper mapper,
            IUnitOfWork uow,
            IUsersService usersService,
            IClaimService claimService,
            IRolesService rolesService,
            IAuthLevelService authLevelService,
            IPasswordValidatorService passwordValidator)
        {
            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _userService = usersService;
            _userService.CheckArgumentIsNull(nameof(_userService));

            _claimService = claimService;
            _claimService.CheckArgumentIsNull(nameof(_claimService));

            _roleService = rolesService;
            _roleService.CheckArgumentIsNull(nameof(_roleService));

            _authLevelService = authLevelService;
            _authLevelService.CheckArgumentIsNull(nameof(_authLevelService));

            _passwordValidator = passwordValidator;
            _passwordValidator.CheckArgumentIsNull(nameof(_passwordValidator));
        }
コード例 #3
0
        public RoleManagerController(IApplicationRoleManager roleManager, IMapper mapper)
        {
            _roleManager = roleManager;
            _roleManager.CheckArgumentIsNull(nameof(_roleManager));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
コード例 #4
0
        public TagController(IUnitOfWork uw, IMapper mapper)
        {
            _uw = uw;
            _uw.CheckArgumentIsNull(nameof(_uw));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
コード例 #5
0
        public NewsController(IUnitOfWork uw, IMapper mapper, IWebHostEnvironment env)
        {
            _uw = uw;
            _uw.CheckArgumentIsNull(nameof(_uw));

            _env = env;
            _env.CheckArgumentIsNull(nameof(_env));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
コード例 #6
0
        public CategoryController(IUnitOfWork uw, IMapper mapper, IMemoryCache cache)
        {
            _uw = uw;
            _uw.CheckArgumentIsNull(nameof(_uw));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _cache = cache;
            _cache.CheckArgumentIsNull(nameof(_cache));
        }
コード例 #7
0
        public NewsRepository(NewsDBContext context, IMapper mapper, IConfiguration configuration, IUnitOfWork uw)
        {
            _context = context;
            _context.CheckArgumentIsNull(nameof(_context));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _configuration = configuration;
            _configuration.CheckArgumentIsNull(nameof(_configuration));

            _uw = uw;
            _uw.CheckArgumentIsNull(nameof(_uw));
        }
コード例 #8
0
        public RoleManagerController(
            IUnitOfWork uow,
            IRolesService rolesService,
            IMapper mapper)
        {
            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _roleService = rolesService;
            _roleService.CheckArgumentIsNull(nameof(_roleService));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }
        public PolicyManagerController(
            IMapper mapper,
            IUnitOfWork uow,
            IPolicyService policyService)
        {
            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _policyService = policyService;
            _policyService.CheckArgumentIsNull(nameof(_policyService));
        }
コード例 #10
0
        public UserManagerController(IApplicationUserManager userManager, IMapper mapper, IApplicationRoleManager roleManager, IWebHostEnvironment env)
        {
            _userManager = userManager;
            _userManager.CheckArgumentIsNull(nameof(_userManager));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _roleManager = roleManager;
            _roleManager.CheckArgumentIsNull(nameof(_roleManager));

            _env = env;
            _env.CheckArgumentIsNull(nameof(_env));
        }
コード例 #11
0
        public AuthLevelsController(
            IAuthLevelService authLevelService,
            IClaimService claimService,
            IMapper mapper,
            IUnitOfWork uow)
        {
            _authLevelService = authLevelService;
            _authLevelService.CheckArgumentIsNull(nameof(_authLevelService));

            _claimService = claimService;
            _claimService.CheckArgumentIsNull(nameof(_claimService));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));

            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));
        }
コード例 #12
0
        public UsersService(
            IUnitOfWork uow,
            ISecurityService securityService,
            IHttpContextAccessor contextAccessor,
            IMapper mapper)
        {
            _uow = uow;
            _uow.CheckArgumentIsNull(nameof(_uow));

            _users     = _uow.Set <User>();
            _userRoles = _uow.Set <UserRole>();
            _roles     = _uow.Set <Role>();

            _securityService = securityService;
            _securityService.CheckArgumentIsNull(nameof(_securityService));

            _contextAccessor = contextAccessor;
            _contextAccessor.CheckArgumentIsNull(nameof(_contextAccessor));

            _mapper = mapper;
            _mapper.CheckArgumentIsNull(nameof(_mapper));
        }