/// <summary> /// Constructor - initializes a new instance of the ShoppingCart class. /// </summary> /// <param name="productStorage">Storage used to validate products and fetch their unit prices</param> /// <param name="discountStorage">Storage used to fetch all active discounts</param> /// <param name="logger">Logger used to log total cost calculations</param> public ShoppingCart(IProductStorage productStorage, IDiscountStorage discountStorage, IShoppingCartLogger logger = null) { //validate the storages this.productStorage = productStorage ?? throw new ArgumentException("Product storage is null", "productStorage"); this.discountStorage = discountStorage ?? throw new ArgumentException("Discount storage is null", "discountStorage"); this.logger = logger ?? new ConsoleShoppingCartLogger(); }
public BrandsController(IProductStorage productStorage, IMapper mapper, IApiStatusMessageDictionary statusMessageDictionary) : base(statusMessageDictionary) { _productStorage = productStorage; _mapper = mapper; }
public MainPage() { InitializeComponent(); storage = new JsonStorage("productlistf"); cl = storage.Load(); clvm = new CategoryListViewModel(cl); BindingContext = clvm; UpdateListContent(); }
public ProductTransactionService(IProductStorage productStorage, IProductTransactionStorage productTransactionStorage, IMapper mapper, IUserStorage userStorage, IDbTransactionService transactionService) { _productStorage = productStorage; _productTransactionStorage = productTransactionStorage; _mapper = mapper; _userStorage = userStorage; _dbTransactionService = transactionService; }
/// <summary> /// Éditer un produit déjà présent dans la liste de produits /// </summary> /// <param name="p">Le vue/modèle du produit à modifer</param> /// <param name="storage">Le stockage à utiliser</param> /// <param name="clvm">La liste de catégories</param> /// <param name="cvm">La catégorie à laquelle ajouter le produit</param> public EditPage(ProductViewModel p, IProductStorage storage, CategoryListViewModel clvm, CategoryViewModel cvm = null) { InitializeComponent(); this.p = p; BindingContext = this.p; this.storage = storage; this.clvm = clvm; listCat.ItemsSource = clvm.Categories; listCat.SelectedItem = p.Category; if (cvm != null) { this.cvm = cvm; } }
public NewProductSagaHandler() { this.productStorage = Bootstrapper.Container.Resolve <IProductStorage>(); }
public ProductService(IProductStorage productStorage, IMapper mapper) { _productStorage = productStorage; _mapper = mapper; }
public ProductRepository(IProductStorage productStorage) { _productStorage = productStorage; }
public ProductService(IProductStorage productStorage) { _productStorage = productStorage; }
public ProductController(IProductStorage _storage) { this.storage = _storage; }
public ProductBusinessLogic(IProductStorage productStorage) { _productStorage = productStorage; }
public AdministratorsOnlyStorageProxy(IProductStorage inner) { _inner = inner; }
public ProductsCatalog(IProductStorage productStorage) { this.productStorage = productStorage; }
public TravelLogic(IProductStorage travelStorage) { _travelStorage = travelStorage; }
public CachingProductStorage(IProductStorage inner) { _inner = inner; _cache = new MemoryCache(new MemoryCacheOptions()); }
public OrderStorage(IOptions <StorageOptions> storageOptions, IProductStorage productStorage) { _connection = new SqlConnection(storageOptions.Value.DBConnectionString); _productStorage = productStorage; }
public ProductPopulateService(IProductStorage productStorage) { _productStorage = productStorage; WarmUpService(); }