Как убедиться, что в службу внедрено значение из AppSettings и HttpClient (созданный с помощью IHttpClientFactory)?
Вот часть моего файла ConfigurationServices при запуске :
int.TryParse(Configuration["AppSettings:soapTimeoutSeconds"], out int seconds);
services.AddHttpClient();
services.AddScoped();
Вот как я создаю свой сервис:
Class SoapService
{
public SoapService(HttpClient httpClient, int seconds)
{
this.HttpClient = httpClient;
this.seconds= seconds;
}
}
Подробнее здесь: https://stackoverflow.com/questions/679 ... in-startup