예제 #1
0
    //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();
    }
예제 #2
0
파일: ServiceTest.cs 프로젝트: kuiyu/RsCode
 public ServiceTest(IEnumerable <IStorageProvider> storageProvider
                    //,QiniuHttpClient _httpClient
                    , HttpClient _httpClient,
                    IOptionsSnapshot <QiniuOptions> _options
                    )
 {
     qiniu      = storageProvider.FirstOrDefault(s => s.StorageName == "qiniu");
     httpClient = _httpClient;
     options    = _options.Value;
 }