public JobService(IOpenFoodProvider openFoodProvider, IOpenFoodRepository openFoodRepository, IOptions <OpenFoodSettings> settings) { if (settings.Value.ImportedProductsMaxValue <= 0) { throw new NotFoundException("Numero máximo de arquivos importados não definido"); } if (string.IsNullOrEmpty(settings.Value.OpenFoodImageUrlBase)) { throw new NotFoundException("Url base para geração das imagens não foi definida"); } ImportedProductsMaxValue = settings.Value.ImportedProductsMaxValue; _openFoodProvider = openFoodProvider; _openFoodRepository = openFoodRepository; _settings = settings; }
public OpenFoodService(IOpenFoodRepository openFoodRepository) { _openFoodRepository = openFoodRepository; }