Esempio n. 1
0
 /// <summary>
 /// Initialite the client.
 /// </summary>
 /// <param name="config">Twilio platform configuration.</param>
 /// <param name="httpClient">Http client.</param>
 public TwilioSmsService(IOptions <TwilioOptions> config, System.Net.Http.HttpClient httpClient)
 {
     _options = config
                .ThrowIfNull(nameof(config))
                .Value
                .ThrowIfNull(nameof(config.Value));
     _client = new TwilioRestClient(
         _options.AccountSID,
         _options.AuthToken,
         region: _options.Region,
         httpClient: new SystemNetHttpClient(httpClient.ThrowIfNull(nameof(httpClient)))
         );
 }