public Task <IBinding> TryCreateAsync(BindingProviderContext context)
        {
            WizHttpClientOptions option = (context.Parameter.GetCustomAttributes(false)[0] as WizHttpClientFactoryAttribute).Option;

            IBinding binding = new WizHttpClientFactoryBinding(option, _httpClientFactory);

            return(Task.FromResult(binding));
        }
コード例 #2
0
 public WizHttpClientFactoryAttribute(WizHttpClientOptions option)
 {
     Option = option;
 }
コード例 #3
0
 public WizHttpClientFactoryValueProvider(WizHttpClientOptions option, HttpRequest request, IHttpClientFactory httpClientFactory)
 {
     _request           = request;
     _httpClientFactory = httpClientFactory;
     _option            = option;
 }
コード例 #4
0
 public WizHttpClientFactoryBinding(WizHttpClientOptions option, IHttpClientFactory httpClientFactory)
 {
     this._option            = option;
     this._httpClientFactory = httpClientFactory;
 }