public ItemRepository(ToDoContext ctx, ILogger <ItemRepository> logger) { ctx.ExtIfNullThrowException("ctx is null"); _ctx = ctx; ctx.ExtIfNullThrowException("logger is null"); _logger = logger; }
public AuthController(ToDoContext ctx, SignInManager <AppUser> signInMgr, // for cookie auth UserManager <AppUser> userMgr, // for token auth IPasswordHasher <AppUser> hasher, // for token auth IConfigurationRoot config, ILogger <AuthController> logger) { ctx.ExtIfNullThrowException("ctx is null."); _context = ctx; signInMgr.ExtIfNullThrowException("signInMgr is null."); _signInMgr = signInMgr; userMgr.ExtIfNullThrowException("userMgr is null."); _userMgr = userMgr; hasher.ExtIfNullThrowException("hasher is null."); _hasher = hasher; config.ExtIfNullThrowException("config is null."); _config = config; logger.ExtIfNullThrowException("logger is null."); _logger = logger; }