public AppPrivilegeController( ILogger <AppPrivilegeController> logger, IAppPrivilegeRepository repository ) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.repository = repository ?? throw new ArgumentNullException(nameof(repository)); }
protected override void Dispose(bool disposing) { if (disposing) { logger = null; repository = null; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { logger = null; userMgr = null; roleMgr = null; jwt = null; navRepo = null; cache = null; userTokenRepo = null; usersCtrl = null; privilegeRepo = null; commonOption = null; } base.Dispose(disposing); }
public AccountController( ILogger <AccountController> logger, UserManager <AppUser> userMgr, RoleManager <AppRole> roleMgr, IOptionsSnapshot <JwtOption> jwt, IAppNavItemRepository navRepo, IDistributedCache cache, IAppUserTokenRepository userTokenRepo, UsersController usersCtrl, IAppPrivilegeRepository privilegeRepo, CommonOption commonOption ) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.userMgr = userMgr ?? throw new ArgumentNullException(nameof(userMgr)); this.roleMgr = roleMgr ?? throw new ArgumentNullException(nameof(roleMgr)); this.jwt = jwt.Value ?? throw new ArgumentNullException(nameof(jwt)); this.navRepo = navRepo ?? throw new ArgumentNullException(nameof(navRepo)); this.cache = cache ?? throw new ArgumentNullException(nameof(cache)); this.userTokenRepo = userTokenRepo ?? throw new ArgumentNullException(nameof(userTokenRepo)); this.usersCtrl = usersCtrl ?? throw new ArgumentNullException(nameof(usersCtrl)); this.privilegeRepo = privilegeRepo ?? throw new ArgumentNullException(nameof(privilegeRepo)); this.commonOption = commonOption ?? throw new ArgumentNullException(nameof(commonOption)); }