April 2017
Intermediate to advanced
564 pages
24h 7m
English
Dependency Injection design pattern fulfills the dependency inversion principle of the SOLID design principles. There are three main forms of dependency injection:
public class OrderProcessorWithSetter : IOrderProcessor { private IOrderRepository _orderRepository; private IOrderNotifier _orderNotifier; public IOrderRepository Repository { get { return _orderRepository; } set { _orderRepository = value; } } public IOrderNotifier Notifier { get { return _orderNotifier; } set { _orderNotifier = value; } } public void Process(IOrder order) { //Perform validations.. ...Read now
Unlock full access