Ejemplo n.º 1
0
        public RestClient(IRestContainer container)
        {
            container.AssertNotNull(nameof(container));

            _container          = container;
            _clientFactory      = _container.Required <IHttpClientFactory>();
            _executionStrategy  = _container.Required <IHttpExecutionStrategy>();
            _httpResponseMapper = _container.Required <IHttpResponseMapper>();
            _requestMapper      = _container.Required <IHttpRequestMapper>();
        }
 public DarkSkyWeatherService(
     DarkSkySettings _darkSkySettings,
     IHttpClient _httpClient,
     IHttpResponseMapper _httpMapper,
     IWeatherCache _weatherCache
     )
 {
     this._darkSkySettings = _darkSkySettings;
     this._httpClient      = _httpClient;
     this._httpMapper      = _httpMapper;
     this._weatherCache    = _weatherCache;
 }