public PayExClient(PayExClientDynamic dynamic, ISelectClient clientSelector) { _dynamic = dynamic; _clientSelector = clientSelector; var selector = clientSelector.Select(); if (string.IsNullOrEmpty(selector)) { throw new Exception("No clientname given. Check ISelectClient and/or any configuration."); } }
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; }