public ProductUndercutters(IConfiguration configuration, IBrandUndercutters brandGetter)
 {
     _configuration = configuration;
     _brandGetter   = brandGetter;
     _client        = new HttpClient()
     {
         BaseAddress = new Uri(_configuration["UndercuttersBaseUri"]),
         Timeout     = TimeSpan.FromSeconds(5)
     };
     _client.DefaultRequestHeaders.Accept.ParseAdd("application/json");
 }
示例#2
0
 public StoreController(StoreDb context,
                        IConfiguration configuration,
                        ICategoryUndercutters _undercuttersCategoryGetter,
                        IBrandUndercutters _undercuttersBrandGetter,
                        IProductUndercutters _undercuttersProductGetter,
                        IProductRepository productRepository, IBrandRepository brandRepository, ICategoryRepository categoryRepository, IMapper mapper)
 {
     _configuration             = configuration;
     undercuttersCategoryGetter = _undercuttersCategoryGetter;
     undercuttersBrandGetter    = _undercuttersBrandGetter;
     undercuttersProductGetter  = _undercuttersProductGetter;
     _productRepository         = productRepository;
     _brandRepository           = brandRepository;
     _categoryRepository        = categoryRepository;
     _mapper = mapper;
     setupUndercutersClient();
 }