/// <summary> /// Create the instance of <see cref="TwilioProvider"/> /// </summary> /// <param name="options">The Twilio provider options</param> /// <param name="httpClientFactory">The instance of <see cref="IHttpClientFactory"/></param> /// <param name="loggerFactory">The instance of <see cref="ILoggerFactory"/></param> public TwilioProvider(IOptions <TwilioOptions> options, IHttpClientFactory httpClientFactory, ILoggerFactory loggerFactory) : base(options.Value, loggerFactory) { _twilioRestClient = new TwilioRestClient(options.Value.AccountSid, options.Value.AuthToken, httpClient: new TwilioHttp.SystemNetHttpClient(httpClientFactory.CreateClient())); _options = options.Value; }
/// <summary> /// Create the instance of <see cref="TwilioProvider"/> /// </summary> /// <param name="options">The Twilio provider options</param> /// <param name="netHttpClient">The instance of <see cref="HttpClient"/></param> /// <param name="loggerFactory">The instance of <see cref="ILoggerFactory"/></param> public TwilioProvider(TwilioOptions options, HttpClient netHttpClient, ILoggerFactory loggerFactory) : base(options, loggerFactory) { _twilioRestClient = new TwilioRestClient(options.AccountSid, options.AuthToken, httpClient: new TwilioHttp.SystemNetHttpClient(netHttpClient)); _options = options; }