public UserController(
            IGraphService graphService,
            IOptions <UserControllerOptions> optionsAccessor,
            IPasswordGenerator passwordGenerator,
            ISmtpService smtpService,
            WingTipUserManager userManager)
        {
            _graphService = graphService ?? throw new ArgumentNullException(nameof(graphService));

            if (optionsAccessor == null)
            {
                throw new ArgumentNullException(nameof(optionsAccessor));
            }

            _options           = optionsAccessor.Value;
            _passwordGenerator = passwordGenerator ?? throw new ArgumentNullException(nameof(passwordGenerator));
            _smtpService       = smtpService ?? throw new ArgumentNullException(nameof(smtpService));
            _userManager       = userManager ?? throw new ArgumentNullException(nameof(userManager));
        }
 public AccountController(IGraphService graphService, IPasswordGenerator passwordGenerator, WingTipUserManager userManager)
 {
     _graphService      = graphService ?? throw new ArgumentNullException(nameof(graphService));
     _passwordGenerator = passwordGenerator ?? throw new ArgumentNullException(nameof(passwordGenerator));
     _userManager       = userManager ?? throw new ArgumentNullException(nameof(userManager));
 }