public CustomerServiceImpl(Func <WorkContext> workContextFactory, IVirtoCommerceCustomerApi customerApi, IVirtoCommerceOrdersApi orderApi, IVirtoCommerceQuoteApi quoteApi, IVirtoCommerceStoreApi storeApi, ILocalCacheManager cacheManager) { _workContextFactory = workContextFactory; _customerApi = customerApi; _orderApi = orderApi; _quoteApi = quoteApi; _storeApi = storeApi; _cacheManager = cacheManager; }
public CommonController(WorkContext workContext, IStorefrontUrlBuilder urlBuilder, IVirtoCommerceStoreApi storeModuleApi) : base(workContext, urlBuilder) { _storeModuleApi = storeModuleApi; _countriesWithoutRegions = workContext.AllCountries .Select(c => new Country { Name = c.Name, Code2 = c.Code2, Code3 = c.Code3, RegionType = c.RegionType }) .ToArray(); }
public WorkContextOwinMiddleware(OwinMiddleware next, UnityContainer container) : base(next) { //Be AWARE! WorkContextOwinMiddleware crated once in first application start //and there can not be resolved and stored in fields services using WorkContext as dependency (WorkCOntext has a per request lifetime) _storeApi = container.Resolve <IVirtoCommerceStoreApi>(); _quoteRequestBuilder = container.Resolve <IQuoteRequestBuilder>(); _pricingModuleApi = container.Resolve <IVirtoCommercePricingApi>(); _commerceApi = container.Resolve <IVirtoCommerceCoreApi>(); _cacheManager = container.Resolve <ILocalCacheManager>(); _staticContentService = container.Resolve <IStaticContentService>(); _container = container; }