コード例 #1
0
ファイル: CartService.cs プロジェクト: adrian18hd/Quicksilver
 public CartService(
     IProductService productService,
     IPricingService pricingService,
     IOrderFactory orderFactory,
     CustomerContextFacade customerContext,
     IPlacedPriceProcessor placedPriceProcessor,
     IInventoryProcessor inventoryProcessor,
     ILineItemValidator lineItemValidator,
     IOrderRepository orderRepository,
     IPromotionEngine promotionEngine,
     IAddressBookService addressBookService,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService)
 {
     _productService = productService;
     _pricingService = pricingService;
     _orderFactory = orderFactory;
     _customerContext = customerContext;
     _placedPriceProcessor = placedPriceProcessor;
     _inventoryProcessor = inventoryProcessor;
     _lineItemValidator = lineItemValidator;
     _promotionEngine = promotionEngine;
     _orderRepository = orderRepository;
     _addressBookService = addressBookService;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
 }
コード例 #2
0
 public LanguageService(ICurrentMarket currentMarket, CookieService cookieService, IUpdateCurrentLanguage defaultUpdateCurrentLanguage, RequestContext requestContext)
 {
     _currentMarket = currentMarket;
     _cookieService = cookieService;
     _defaultUpdateCurrentLanguage = defaultUpdateCurrentLanguage;
     _requestContext = requestContext;
 }
コード例 #3
0
        public DeliveryReceipt(ICurrentMarket currentMarket, PurchaseOrderModel purchaseOrder)
        {
            if (purchaseOrder == null) throw new ArgumentNullException("purchaseOrder cannot be null");

            _purchaseOrder = purchaseOrder;
            _orderViewModel = new OrderViewModel(currentMarket.GetCurrentMarket().DefaultCurrency.Format, _purchaseOrder);

            To = _orderViewModel.Email;

            var localizationService = ServiceLocator.Current.GetInstance<LocalizationService>();
            IMarketService marketService = ServiceLocator.Current.GetInstance<IMarketService>();
            IMarket market = GetMarketForOrder(purchaseOrder, marketService, currentMarket);

            string emailSubject = localizationService.GetStringByCulture("/common/receipt/email/subject", market.DefaultLanguage);

            Subject = string.Format(emailSubject, _purchaseOrder.TrackingNumber);
            BackendOrderNumber = _orderViewModel.ErpOrderNumber;
            PurchaseOrderNumber = _purchaseOrder.TrackingNumber;

            // Get first shipment tracking number
            if (_purchaseOrder.OrderForms != null &&
                _purchaseOrder.OrderForms.Any() &&
                _purchaseOrder.OrderForms.First().Shipments != null &&
                _purchaseOrder.OrderForms.First().Shipments.Any())
            {
                TrackingNumber = _purchaseOrder.OrderForms.First().Shipments.First().ShipmentTrackingNumber;
            }
        }
コード例 #4
0
 public CartItemViewModelFactory(
     IContentLoader contentLoader,
     IPricingService pricingService,
     UrlResolver urlResolver,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService,
     IPromotionService promotionService,
     AppContextFacade appContext,
     ILineItemCalculator lineItemCalculator,
     IProductService productService, 
     IRelationRepository relationRepository, 
     ICartService cartService)
 {
     _contentLoader = contentLoader;
     _pricingService = pricingService;
     _urlResolver = urlResolver;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
     _promotionService = promotionService;
     _appContext = appContext;
     _lineItemCalculator = lineItemCalculator;
     _productService = productService;
     _relationRepository = relationRepository;
     _cartService = cartService;
 }
コード例 #5
0
 public MarketController(IMarketService marketService, ICurrentMarket currentMarket, UrlResolver urlResolver, LanguageService languageService)
 {
     _marketService = marketService;
     _currentMarket = currentMarket;
     _urlResolver = urlResolver;
     _languageService = languageService;
 }
コード例 #6
0
 public ConfirmationService(
     IOrderRepository orderRepository,
     ICurrentMarket currentMarket)
 {
     _orderRepository = orderRepository;
     _currentMarket = currentMarket;
 }
コード例 #7
0
 public EmailService(INotificationSettingsRepository notificationSettingsRepository, IEmailDispatcher emailDispatcher, ICurrentMarket currentMarket, IContentLoader contentLoader, IMarketService marketService)
 {
     _notificationSettingsRepository = notificationSettingsRepository;
     _emailDispatcher = emailDispatcher;
     _currentMarket = currentMarket;
     _contentLoader = contentLoader;
     _marketService = marketService;
 }
コード例 #8
0
 public PaymentMethodViewModelFactory(
     ICurrentMarket currentMarket,
     LanguageService languageService,
     IPaymentService paymentService)
 {
     _currentMarket = currentMarket;
     _languageService = languageService;
     _paymentService = paymentService;
 }
コード例 #9
0
 public PricingService(IPriceService priceService,
     ICurrentMarket currentMarket, 
     ICurrencyService currencyService,
     AppContextFacade appContext)
 {
     _priceService = priceService;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
     _appContext = appContext;
 }
コード例 #10
0
 public CheckoutService(
     Func<string, CartHelper> cartHelper, 
     ICurrentMarket currentMarket, 
     LanguageService languageService, 
     CountryManagerFacade countryManager)
 {
     _cartHelper = cartHelper;
     _currentMarket = currentMarket;
     _languageService = languageService;
     _countryManager = countryManager;
 }
コード例 #11
0
ファイル: SearchService.cs プロジェクト: ocrenaka/Quicksilver
 public SearchService(ICurrentMarket currentMarket, 
     ICurrencyService currencyService, 
     UrlResolver urlResolver, 
     SearchFacade search,
     Func<CultureInfo> preferredCulture,
     IContentLoader contentLoader,
     LocalizationService localizationService)
 {
     _search = search;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
     _urlResolver = urlResolver;
     _preferredCulture = preferredCulture();
     _contentLoader = contentLoader;
     _localizationService = localizationService;
 }
コード例 #12
0
 public ProductService(IContentLoader contentLoader,
     IPromotionService promotionService,
     IPricingService pricingService,
     UrlResolver urlResolver,
     LinksRepository linksRepository,
     IRelationRepository relationRepository,
     ICurrentMarket currentMarket,
     ICurrencyService currencyService,
     AppContextFacade appContext,
     ReferenceConverter referenceConverter)
 {
     _contentLoader = contentLoader;
     _promotionService = promotionService;
     _pricingService = pricingService;
     _urlResolver = urlResolver;
     _linksRepository = linksRepository;
     _relationRepository = relationRepository;
     _preferredCulture = ContentLanguage.PreferredCulture;
     _currentMarket = currentMarket;
     _currencyService = currencyService;
     _appContext = appContext;
     _referenceConverter = referenceConverter;
 }
コード例 #13
0
 protected IMarket GetMarketForOrder(PurchaseOrderModel purchaseOrder, IMarketService marketService, ICurrentMarket currentMarket)
 {
     if (purchaseOrder.MarketId != null && purchaseOrder.MarketId.Value != null)
     {
         return marketService.GetMarket(purchaseOrder.MarketId);
     }
     return currentMarket.GetCurrentMarket();
 }
コード例 #14
0
 public LanguageService(ICurrentMarket currentMarket, CookieService cookieService, IUpdateCurrentLanguage defaultUpdateCurrentLanguage)
 {
     _currentMarket = currentMarket;
     _cookieService = cookieService;
     _defaultUpdateCurrentLanguage = defaultUpdateCurrentLanguage;
 }
コード例 #15
0
 public CurrentCurrency(ICookieRepository cookieRepository, ICurrentMarket currentMarket)
 {
     _cookieRepository = cookieRepository;
     _currentMarket    = currentMarket;
 }
コード例 #16
0
 public SwedbankPayCheckoutController(ISwedbankPayClientFactory swedbankPayClientFactory, ICurrentMarket currentMarket)
 {
     _swedbankPayClientFactory = swedbankPayClientFactory;
     _currentMarket            = currentMarket;
 }
コード例 #17
0
 public QuickOrderService(IContentLoader contentLoader, IInventoryService inventoryService, ICurrentMarket currentMarket, ICurrencyService currencyService, IPriceService priceService, IPromotionService promotionService)
 {
     _contentLoader    = contentLoader;
     _inventoryService = inventoryService;
     _currentMarket    = currentMarket;
     _currencyService  = currencyService;
     _priceService     = priceService;
     _promotionService = promotionService;
 }
コード例 #18
0
 public SearchViewModelFactory(LocalizationService localizationService, ISearchService searchService, ICurrentMarket currentMarket, IFindProductSearchService findProductSearchService)
 {
     _searchService            = searchService;
     _localizationService      = localizationService;
     _currentMarket            = currentMarket;
     _findProductSearchService = findProductSearchService;
 }
コード例 #19
0
 public CheckoutController(CustomerAddressRepository customerAddressRepository, IContentRepository contentRepository, ICurrentMarket currentMarket, ICustomerFactory customerFactory, LocalizationService localizationService)
 {
     _customerAddressRepository = customerAddressRepository;
     _contactRepository         = new ContactRepository();
     _contentRepository         = contentRepository;
     _currentMarket             = currentMarket;
     _localizationService       = localizationService;
     _customerFactory           = customerFactory;
 }
コード例 #20
0
 public GenericProductContentController(IWarehouseInventoryService inventoryService, LocalizationService localizationService, ReadOnlyPricingLoader readOnlyPricingLoader, ICurrentMarket currentMarket)
 {
     _inventoryService      = inventoryService;
     _localizationService   = localizationService;
     _readOnlyPricingLoader = readOnlyPricingLoader;
     _currentMarket         = currentMarket;
 }
コード例 #21
0
 public VsfPriceService(ICurrentMarket currentMarket, IPriceDetailService priceDetailService)
 {
     _currentMarket      = currentMarket;
     _priceDetailService = priceDetailService;
 }
コード例 #22
0
        public static int GetDefaultPriceAmount(this VariationContent variation)
        {
            ICurrentMarket currentMarket = ServiceLocator.Current.GetInstance <ICurrentMarket>();

            return(GetDefaultPriceAmount(variation, currentMarket.GetCurrentMarket()));
        }
コード例 #23
0
 public GenericProductSchemaDataMapper(ICurrentMarket currentMarket, ICurrencyService currencyService)
 {
     _currentMarket   = currentMarket;
     _currencyService = currencyService;
 }
コード例 #24
0
 public StartControllerForTest(
     IContentLoader contentLoader,
     ICurrentMarket currentMarket,
     MarketContentLoader marketContentLoader)
     : base(contentLoader, currentMarket, marketContentLoader)
 { }
コード例 #25
0
 public ShirtVariationController(IContentLoader contentLoader, UrlResolver urlResolver,
                                 AssetUrlResolver assetUrlResolver, ThumbnailUrlResolver thumbnailUrlResolver,
                                 IOrderRepository orderRepository, ILineItemValidator lineItemValidator, ICurrentMarket currentMarket) : base(contentLoader, urlResolver, assetUrlResolver, thumbnailUrlResolver)
 {
     _orderRepository   = orderRepository;
     _lineItemValidator = lineItemValidator;
     _currentMarket     = currentMarket;
 }
コード例 #26
0
 public CommerceSearchService(IServiceFactory service)
 {
     _currentMarket = service.GetService <ICurrentMarket>();
 }
コード例 #27
0
 public GenericPaymentController(IContentRepository contentRepository, IOrderService orderService, IPaymentCompleteHandler paymentCompleteHandler, ISiteSettingsProvider siteConfiguration, ICurrentMarket currentMarket, ILogger logger)
 {
     _contentRepository      = contentRepository;
     _orderService           = orderService;
     _siteConfiguration      = siteConfiguration;
     _paymentCompleteHandler = paymentCompleteHandler;
     _currentMarket          = currentMarket;
     _logger = logger;
 }
コード例 #28
0
 public CurrencyService(ICurrentMarket currentMarket, CookieService cookieService)
 {
     _currentMarket = currentMarket;
     _cookieService = cookieService;
 }
コード例 #29
0
 public DefaultVerifonePaymentService(ICurrentMarket currentMarket, IOrderRepository orderRepository, IOrderGroupCalculator orderGroupCalculator)
 {
     OrderGroupCalculator = orderGroupCalculator ?? throw new ArgumentNullException(nameof(orderGroupCalculator));
     OrderRepository      = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     CurrentMarket        = currentMarket.GetCurrentMarket() ?? throw new ArgumentNullException(nameof(currentMarket));
 }
コード例 #30
0
 public ReceiptViewModelBuilder(IContentRepository contentRepository, ISiteSettingsProvider siteConfiguration, ICurrentMarket currentMarket)
 {
     _contentRepository = contentRepository;
     _siteConfiguration = siteConfiguration;
     _currentMarket = currentMarket;
 }
コード例 #31
0
 public FacetNumericRangeDefinition(ICurrentMarket currentMarket)
 {
     _currentMarket = currentMarket;
     Range          = new List <SelectableNumericRange>();
     RenderType     = GetType().Name;
 }
コード例 #32
0
 public BudgetingController(IBudgetService budgetService, IOrganizationService organizationService, ICurrentMarket currentMarket, ICustomerService customerService)
 {
     _budgetService       = budgetService;
     _organizationService = organizationService;
     _currentMarket       = currentMarket;
     _customerService     = customerService;
 }
コード例 #33
0
 public CurrencyService(ICurrentMarket currentMarket, CookieService cookieService)
 {
     _currentMarket = currentMarket;
     _cookieService = cookieService;
 }
コード例 #34
0
 public CustomCurrencySiteContext(ICurrencyService currencyService, ICurrentMarket currentMarket) 
     : base(currentMarket)
 {
     _lazyCurrency = new Lazy<Currency>(() => currencyService.GetCurrentCurrency());
 }
コード例 #35
0
 public CheckOutController(ICurrentMarket currentMarket)
 {
     _currentMarket = currentMarket;
 }