// CONSTRUCTOR public ShoppingCartUI(IProductController resProd, ICartController resCart, SQLConnection conn) { InitializeComponent(); this.ResProd = resProd; this.ResCart = resCart; this.Conn = conn; }
public OrderMapper(IOrdersController ordersController, ICatalogsController catalogsController, ICartController cartController, IProductController productController) { _eaOrderController = ordersController; _eaCatalogsController = catalogsController; _magentoCartController = cartController; _magentoProductController = productController; }
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; }