/// <summary> /// Ctor /// </summary> public DiscountService(ICacheManager cacheManager, IRepository <Discount> discountRepository, IRepository <DiscountCoupon> discountCouponRepository, IRepository <DiscountUsageHistory> discountUsageHistoryRepository, ILocalizationService localizationService, IStoreContext storeContext, IGenericAttributeService genericAttributeService, IPluginFinder pluginFinder, IMediator mediator, IRepository <Product> productRepository, IRepository <Category> categoryRepository, IRepository <Manufacturer> manufacturerRepository, IRepository <Vendor> vendorRepository, IRepository <Store> storeRepository, PerRequestCacheManager perRequestCache, ShoppingCartSettings shoppingCartSettings ) { this._cacheManager = cacheManager; this._discountRepository = discountRepository; this._discountCouponRepository = discountCouponRepository; this._discountUsageHistoryRepository = discountUsageHistoryRepository; this._localizationService = localizationService; this._storeContext = storeContext; this._genericAttributeService = genericAttributeService; this._pluginFinder = pluginFinder; this._mediator = mediator; this._productRepository = productRepository; this._categoryRepository = categoryRepository; this._manufacturerRepository = manufacturerRepository; this._vendorRepository = vendorRepository; this._storeRepository = storeRepository; this._perRequestCache = perRequestCache; this._shoppingCartSettings = shoppingCartSettings; }
/// <summary> /// Ctor /// </summary> public DiscountService(ICacheManager cacheManager, IRepository <Discount> discountRepository, IRepository <DiscountCoupon> discountCouponRepository, IRepository <DiscountUsageHistory> discountUsageHistoryRepository, ILocalizationService localizationService, IStoreContext storeContext, IPluginFinder pluginFinder, IMediator mediator, IRepository <Product> productRepository, IRepository <Category> categoryRepository, IRepository <Manufacturer> manufacturerRepository, IRepository <Vendor> vendorRepository, PerRequestCacheManager perRequestCache, ShoppingCartSettings shoppingCartSettings, CatalogSettings catalogSettings ) { _cacheManager = cacheManager; _discountRepository = discountRepository; _discountCouponRepository = discountCouponRepository; _discountUsageHistoryRepository = discountUsageHistoryRepository; _localizationService = localizationService; _storeContext = storeContext; _pluginFinder = pluginFinder; _mediator = mediator; _productRepository = productRepository; _categoryRepository = categoryRepository; _manufacturerRepository = manufacturerRepository; _vendorRepository = vendorRepository; _perRequestCache = perRequestCache; _shoppingCartSettings = shoppingCartSettings; _catalogSettings = catalogSettings; }
public PerRequestCacheManagerTest() { var accessorMock = new Mock <IHttpContextAccessor>(); _cachedItems = new Dictionary <object, object> { { "key1", "value1" }, { "key2", 2 }, { "key:other", null }, }; var contextMock = new Mock <HttpContext>(); contextMock.SetupGet(m => m.Items).Returns(_cachedItems); accessorMock.SetupGet(m => m.HttpContext).Returns(contextMock.Object); _cacheManager = new PerRequestCacheManager(accessorMock.Object); }
public ContactService() { _umbracoHelper = PerRequestCacheManager.UmbracoHelper(); }
public ContactSurfaceController() { _contactService = new ContactService(); _emailService = new EmailService(); _umbracoHelper = PerRequestCacheManager.UmbracoHelper(); }