public WeatherService(IInternalConfig config, IHttpClientFactory factory, IMemoryCache cache) { _config = config; if (string.IsNullOrWhiteSpace(_config.OpenWeatherServiceToken)) { throw new ArgumentNullException(nameof(IInternalConfig.OpenWeatherServiceToken)); } _cache = cache ?? throw new ArgumentNullException(nameof(cache)); _client = factory.CreateClient(); _client.BaseAddress = new Uri("http://api.openweathermap.org"); }
public Transfer(IInternalConfig internalConfig) { source = internalConfig.GetFileConnection("source"); destination = internalConfig.GetFileConnection("destination"); }