//private readonly HttpClient _httpClient; public QiniuService(IOptions <QiniuOptions> options) // , IHttpClientFactory httpClientFactory { _options = options.Value; _mac = new Mac(_options.AccessKey, _options.SecretKey); _zone = ZoneHelper.QueryZone(_options.AccessKey, _options.Bucket); //_httpClient = httpClientFactory.CreateClient(); }
public ServiceTest(IEnumerable <IStorageProvider> storageProvider //,QiniuHttpClient _httpClient , HttpClient _httpClient, IOptionsSnapshot <QiniuOptions> _options ) { qiniu = storageProvider.FirstOrDefault(s => s.StorageName == "qiniu"); httpClient = _httpClient; options = _options.Value; }