Exemplo n.º 1
0
 /// <summary>
 /// Constructor which accepts the service as a parameter which is a dependency.
 /// This dependency is configured in the UnityConfig file inside RegisterTypes function
 /// This is in Service layer project inside ServiceLocation folder
 /// This is a file called UnityMvcActivator which is responsible to Start and Shutdown the DI
 /// Start will called when the application start
 /// Shutdown will called when the application stop
 /// </summary>
 /// <param name="service"></param>
 public ToDoController(IToDoBL service)
 {
     _toDoService = service;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor which accepts the service as a parameter which is a dependency.
 ///  This dependency is configured in the UnityConfigMobileApp file inside RegisterComponents function
 /// This is in Service layer project inside ServiceLocation folder
 /// This is a file called Startup.Mobile inside that  UnityConfigMobileApp.RegisterComponents(config); which is responsible to Start the DI
 /// </summary>
 /// <param name="businessLogic"></param>
 public CacheController(IToDoBL businessLogic)
 {
     this._toDoBL = businessLogic;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructor which accepts the service as a parameter which is a dependency.
 /// This dependency is configured in the UnityConfig file inside RegisterTypes function
 /// This is in Service layer project inside ServiceLocation folder
 /// This is a file called UnityMvcActivator which is responsible to Start and Shutdown the DI
 /// Start will called when the application start
 /// Shutdown will called when the application stop
 /// </summary>
 /// <param name="service"></param>
 public CacheController(IToDoBL service)
 {
     this._toDoService = service;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor which accepts the businessService and loggerFactory as a parameter which is a dependency.
 /// </summary>
 /// <param name="businessService"></param>
 /// <param name="loggerFactory"></param>
 public ToDoController(IToDoBL businessService, ILoggerFactory loggerFactory)
 {
     _logger      = loggerFactory.CreateLogger <ToDoController>();
     _toDoService = businessService;
 }