public SupermarketsController(ISupermarketRepository supermarketRepository, ICategoryRepository categoryRepository, ISupermarketCategoriesRepository supermarketCategoriesRepository) { this.supermarketRepository = supermarketRepository; this.categoryRepository = categoryRepository; this.supermarketCategoriesRepository = supermarketCategoriesRepository; }
public BuyerAI(Buyer buyer, ISupermarketRepository supermarketRepository, IShelfSelectionAlgorithm shelfSelectionAlgorithm, ICashboxSelectionAlgorithm cashboxSelectionAlgorithm) { if (buyer == null) { throw new ArgumentNullException(nameof(buyer)); } if (supermarketRepository == null) { throw new ArgumentNullException(nameof(supermarketRepository)); } if (shelfSelectionAlgorithm == null) { throw new ArgumentNullException(nameof(shelfSelectionAlgorithm)); } if (cashboxSelectionAlgorithm == null) { throw new ArgumentNullException(nameof(cashboxSelectionAlgorithm)); } Buyer = buyer; _supermarketRepository = supermarketRepository; _shelfSelectionAlgorithm = shelfSelectionAlgorithm; _cashboxSelectionAlgorithm = cashboxSelectionAlgorithm; _manualResetEvent = new ManualResetEvent(false); }
public StockController(ISupermarketRepository supermarketRepository, IStockPropertyMappingService stockMappingService, ITypeHelperService typeHelperService, IUrlHelper urlHelper) { _supermarketRepository = supermarketRepository; _stockMappingService = stockMappingService; _typeHelperService = typeHelperService; _urlHelper = urlHelper; }
public ProductsController(ISupermarketRepository supermarketRepository, IProductPropertyMappingService propertyMappingService, ITypeHelperService typeHelperService, IUrlHelper urlHelper) { _supermarketRepository = supermarketRepository; _propertyMappingService = propertyMappingService; _typeHelperService = typeHelperService; _urlHelper = urlHelper; }
public SupermarketController(ISupermarketRepository supermarketRepository, IUrlHelper urlHelper, IPropertyMappingService propertyMappingService, ITypeHelperService typeHelperService, IProductPropertyMappingService productPropertyMappingService, IStaffMemberPropertyMappingService staffMemberPropertyMappingService) { _supermarketRepository = supermarketRepository; _urlHelper = urlHelper; _propertyMappingService = propertyMappingService; _typeHelperService = typeHelperService; _productPropertyMappingService = productPropertyMappingService; _staffMemberPropertyMappingService = staffMemberPropertyMappingService; }
static void Main(string[] args) { _supermarketRepository = new SupermarketRepository(); var supermarketProvider = new SupermarketProvider(); var productSpecProvider = new ProductSpecificationsProvider(); _buyerProvider = new BuyerProvider(); _shelfSelectionAlgorithm = new ShelfSelectionAlgorithm(); _cashboxSelectionAlgorithm = new CashboxSelectionAlgorithm(); _supermarket = supermarketProvider.Provide(productSpecProvider.Provide(30), 5); _supermarketRepository.Save(_supermarket); EnterBuyers(10); Console.ReadLine(); }
public ProductCollectionsController(ISupermarketRepository supermarketRepository, ILogger <SupermarketController> logger) { _supermarketRepository = supermarketRepository; _logger = logger; }
public StaffMemberCollectionsController(ISupermarketRepository supermarketRepository, ILogger <SupermarketController> logger) { _supermarketRepository = supermarketRepository; _logger = logger; }
public HomeController(ISupermarketRepository supermarketRepository) { _supermarketRepository = supermarketRepository; }
public BasketController(ISupermarketRepository supermarketRepository) { _supermarketRepository = supermarketRepository; _basket = ShoppingBasket.GetBasket(1); // We will need to update to get basket id from DB or Session / cookies etc _basket.Products = _supermarketRepository.GetAllLineItemsByBasketId(_basket.BasketId).ToList(); }