Esempio n. 1
0
 // CONSTRUCTOR
 public ShoppingCartUI(IProductController resProd, ICartController resCart, SQLConnection conn)
 {
     InitializeComponent();
     this.ResProd = resProd;
     this.ResCart = resCart;
     this.Conn    = conn;
 }
Esempio n. 2
0
        public OrderMapper(IOrdersController ordersController, ICatalogsController catalogsController, ICartController cartController, IProductController productController)
        {
            _eaOrderController    = ordersController;
            _eaCatalogsController = catalogsController;

            _magentoCartController    = cartController;
            _magentoProductController = productController;
        }
Esempio n. 3
0
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Dependency Injection Performed
            DISocket.PlugSocket();
            IProductController resProd = DISocket.ISocket;
            ICartController    resCart = DISocket.IAdapter;
            SQLConnection      connect = DISocket.Connect;

            // Passing the Dependency into the Form
            Application.Run(new ShoppingCartUI(resProd, resCart, connect));
        }
 public CartController(ICartController cartController)
 {
     _cartController = cartController;
 }