public TextMessagingService( IOptions <TwilioSmsSettings> smsOptions, ILogger <TextMessagingService> logger) { _smsOptions = smsOptions?.Value ?? throw new ArgumentNullException(nameof(smsOptions)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); var accountId = _smsOptions.AccountIdKey; var authToken = _smsOptions.AuthTokenKey; TwilioClient.Init(accountId, authToken); }
public HomeController(ILogger <HomeController> logger, IOptions <TwilioSmsSettings> twilioSmsSettings) { _logger = logger; _twilioSmsSettings = twilioSmsSettings.Value; }