Beispiel #1
0
        public PayExClient(IHttpClientFactory clientFactory, IOptionsSnapshot <PayExOptions> options, ISelectClient clientSelector, ILogPayExHttpResponse logger = null)
        {
            _clientFactory  = clientFactory;
            _clientSelector = clientSelector;
            _logger         = logger ?? new NoOpLogger();
            var selector = _clientSelector.Select();

            if (string.IsNullOrEmpty(selector))
            {
                throw new Exception("No clientname given. Check ISelectClient and/or any configuration.");
            }
            _optionFetcher = options;
        }
 public PayExClientDynamic(IHttpClientFactory clientFactory, IOptionsSnapshot <PayExOptions> options, ILogPayExHttpResponse logger = null)
 {
     _clientFactory = clientFactory;
     _logger        = logger ?? new NoOpLogger();
     _optionFetcher = options;
 }
 public PayExHttpClient(HttpClient client, ILogPayExHttpResponse logger)
 {
     _client = client;
     _logger = logger;
 }