Esempio n. 1
0
 public DetailProductViewModel(IProductStorageService productService, ICartService cartService, IGlobalEventor globalEventor)
 {
     _productService = productService;
     _cartService    = cartService;
     _globalEventor  = globalEventor;
     _globalEventor.Subscribe <Events.CartChangeEvent>(CartChange);
 }
Esempio n. 2
0
        public MainViewModel(ICartService cartService, IGlobalEventor eventor)
        {
            _eventor     = eventor;
            _cartService = cartService;

            ProductsGridViewModel = Mvx.IocConstruct <ProductsGridViewModel>();
            CartViewModel         = Mvx.IocConstruct <CartViewModel>();
        }
Esempio n. 3
0
 public CartService(IProductStorageService productService, IGlobalEventor eventor, ICartRepository cartRepository, ITaxService taxService, IShippingMethodsService shipmentService)
 {
     _eventor         = eventor;
     _productService  = productService;
     _cartRepository  = cartRepository;
     _taxService      = taxService;
     _shipmentService = shipmentService;
 }
Esempio n. 4
0
 public OrderService(ICartService cartService, IGlobalEventor eventor, IShippingMethodsService shippingMethodService, IPaymentMethodService paymentService, Repositories.IOrderRepository orderReposytory)
 {
     _paymentMethodService  = paymentService;
     _orderRepository       = orderReposytory;
     _cartService           = cartService;
     _globalEventor         = eventor;
     _shippingMethodService = shippingMethodService;
 }
Esempio n. 5
0
 public CartViewModel(ICartService cartService, IOrderService orderService, IGlobalEventor globalEventor)
 {
     _cartService   = cartService;
     _orderService  = orderService;
     _globalEventor = globalEventor;
     _globalEventor.Subscribe <Events.CartChangeEvent>(arg =>
     {
         Cart = _cartService.GetCart();
     });
     Cart = _cartService.GetCart();
 }
 public ProductsGridViewModel(ISyncService syncService, IProductStorageService productService, ICartService cartService, IFilterService filterService, IGlobalEventor globalEventor)
 {
     _syncService            = syncService;
     _productsStorageService = productService;
     _cartService            = cartService;
     _filterService          = filterService;
     _globalEventor          = globalEventor;
     if (!SyncManager.SyncComplete && _productsStorageService.GetProductsCount() == 0)
     {
         RunSync();
     }
     else
     {
         GetProducts(0, _countProductPerPage);
         RunBackgroundAsync();
         _globalEventor.Subscribe <Events.SyncEvent>(SyncComplate);
     }
 }