public ShoppingCart(ICartComponentService cartComponentService) { _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService)); }
public IndexModel(IIndexPageService indexPageService, ICartComponentService cartComponentService) { _indexPageService = indexPageService ?? throw new ArgumentNullException(nameof(indexPageService)); _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService)); }
private readonly ICartComponentService _cartComponentService; // due to every page has cart, we also inject cart view component service in order to catch post actions public ProductsModel(IProductPageService productPageService, ICartComponentService cartComponentService) { _productPageService = productPageService ?? throw new ArgumentNullException(nameof(productPageService)); _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService)); }
public CompareModel(IComparePageService comparePageService, ICartComponentService cartComponentService) { _comparePageService = comparePageService ?? throw new ArgumentNullException(nameof(comparePageService)); _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService)); }
public WishlistModel(IWishlistPageService wishlistPageService, ICartComponentService cartComponentService) { _wishlistPageService = wishlistPageService ?? throw new ArgumentNullException(nameof(wishlistPageService)); _cartComponentService = cartComponentService ?? throw new ArgumentNullException(nameof(cartComponentService)); }